This commit introduces word-wrapping functionality to the TextArea component. The changes ensure that text exceeding the visible area of the TextArea wraps onto the next line. Additionally, cursor movement with arrow keys has been updated to work correctly with the new word-wrapping feature. Key modifications include:
Added get_wrapped_lines method in TextEditBuffer to handle text wrapping based on specified width and font metrics.
Updated move_point_up and move_point_down methods in TextEditBuffer to account for wrapped lines.
Modified TextArea to use the new get_wrapped_lines method for rendering and cursor movement.
These changes address the issue and improve text handling within the TextArea component.
This commit introduces word-wrapping functionality to the TextArea component. The changes ensure that text exceeding the visible area of the TextArea wraps onto the next line. Additionally, cursor movement with arrow keys has been updated to work correctly with the new word-wrapping feature. Key modifications include:
get_wrapped_lines
method inTextEditBuffer
to handle text wrapping based on specified width and font metrics.move_point_up
andmove_point_down
methods inTextEditBuffer
to account for wrapped lines.TextArea
to use the newget_wrapped_lines
method for rendering and cursor movement.These changes address the issue and improve text handling within the TextArea component.
Closes #19