| TE_shrinkWrap | Function (ROM Call 0xB2)

textedit.h

HANDLE TE_shrinkWrap (TEXT_EDIT *te);

Shrinks the text editor buffer.

TE_shrinkWrap shrinks the text editor buffer (associated with the structure pointed to by te) to the minimal possible size. After calling this function, the size of the buffer will be equal to the actual number of characters in the buffer. This function must not be applied to text buffers opened with the TE_openFixed function. TE_shrinkWrap returns the handle of the text editor buffer as the result. In addition, this function cancels selection highlight and turns off the cursor. The edit buffer memory is not freed. Use this routine to prepare the edit buffer for further processing or to be stored as a variable.
If NULL is passed as an argument, TE_shrinkWrap creates a new handle for the text editor buffer.

Uses: TE_unfocus, HeapRealloc
Used by: cmd_input, cmd_inputstr, cmd_prompt, Dialog, HomeExecute