another piece of support for line wrapping in cursor up
[?]
May 20, 2022, 10:19 PM
C42QQZSFFGU6DZ73MCPGYZJQ675YTMEOJAPQLHKRJLWQH5GMWHMQCDependencies
- [2]
MGT5FTJ3first stab at supporting wrapping in cursor up - [3]
XNFTJHC4split keyboard handling between Text and Drawing - [*]
BULPIBEGbeginnings of a module for the text editor - [*]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing
Change contents
- replacement in text.lua at line 230
Cursor_pos = Text.nearest_cursor_pos(Lines[Cursor_line].data, old_x)if Lines[Cursor_line].screen_line_starting_pos == nil thenCursor_pos = Text.nearest_cursor_pos(Lines[Cursor_line].data, old_x)breakendlocal screen_line_starting_pos = Lines[Cursor_line].screen_line_starting_posscreen_line_starting_pos = screen_line_starting_pos[#screen_line_starting_pos]Top_screen_line_starting_pos = screen_line_starting_poslocal s = string.sub(Lines[Cursor_line].data, screen_line_starting_pos)Cursor_pos = screen_line_starting_pos + Text.nearest_cursor_pos(s, old_x) - 1 - edit in manual_tests at line 26
if previous line (above top of screen) wrapped, it scrolls up by only one screen line