another bugfix in scrolling while inserting text
[?]
Jun 5, 2022, 5:08 PM
QKAMUWSB6GWKEGLXFKALGCIU7HBTZ4YGLIR7TLA6ZZCUK7WNCNUQCDependencies
- [2]
NZKYPBSKcheck for scroll when just typing - [3]
WY3JD6W6bugfix - [4]
CUIV2LE5some typos - [5]
VJ77YABHmore efficient undo/redo - [6]
73OCE2MCafter much struggle, a brute-force undo - [7]
2RXZ3PGObeginning of a new approach to scroll+wrap - [8]
KOTI3MFGbugfix in previous commit - [9]
LXTTOB33extract a couple of files - [10]
ZLJGZYQGselect text with shift + mouseclick - [11]
XNFTJHC4split keyboard handling between Text and Drawing - [*]
BULPIBEGbeginnings of a module for the text editor - [*]
OTIBCAUJlove2d scaffold - [*]
DLQMM265scroll past first page - [*]
HOSPP2ANcrisp font rendering
Change contents
- replacement in text_tests.lua at line 135
-- display a few lines with cursor on bottom line-- display a few lines - replacement in text_tests.lua at line 149
-- after hitting the enter key the screen scrolls down-- paste some text including a newline, check that new line is created - edit in text_tests.lua at line 739
function test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom()io.write('\ntest_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom')-- display just an empty bottom line on screenApp.screen.init{width=25+30, height=60}Lines = load_array{'abc', ''}Line_width = App.screen.widthCursor1 = {line=2, pos=1}Screen_top1 = {line=2, pos=1}Screen_bottom1 = {}App.draw()-- after hitting the inserting_text key the screen does not scroll downApp.run_after_textinput('a')check_eq(Screen_top1.line, 2, 'F - test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom/screen_top')check_eq(Cursor1.line, 2, 'F - test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom/cursor:line')check_eq(Cursor1.pos, 2, 'F - test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom/cursor:pos')local y = Margin_topApp.screen.check(y, 'a', 'F - test_inserting_text_on_final_line_avoids_scrolling_down_when_not_at_bottom/screen:1')end - edit in text.lua at line 159
local scroll_down = Text.le1(Screen_bottom1, Cursor1) - replacement in text.lua at line 160
if scroll_down thenif Cursor_y >= App.screen.height - Line_height then - edit in main.lua at line 169[15.1391][16.4221]
Screen_bottom1.pos = Screen_top1.pos