bugfix: pagedown was sometimes bouncing up
[?]
Aug 11, 2022, 5:56 AM
Y4SPXCM3PKARGUU22FNBEDRU7S6CJSNYVAA76JYH4I4EMMMKP6LQCDependencies
- [2]
ILOA5BYFseparate data structure for each line's cache data - [3]
LERERVPHkeep one screen line of overlap on pagedown - [4]
CVGE3SIGI feel confident now that page-down is working. - [5]
GK47BBCYstart passing left/right margins everywhere - [6]
3ZSUBI57drop some redundant args from Text.draw - [7]
MXA3RZYKdeduce left/right from state where possible - [8]
HGC5RGJPswitch to line index in a function - [9]
MYC7XR5Qbugfix: lines that aren't drawn from the start - [10]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [*]
LXTTOB33extract a couple of files - [*]
BULPIBEGbeginnings of a module for the text editor
Change contents
- edit in text_tests.lua at line 1087
function test_pagedown_never_moves_up()io.write('\ntest_pagedown_never_moves_up')-- draw the final screen line of a wrapping lineApp.screen.init{width=Editor_state.left+30, height=60}Editor_state = edit.initialize_test_state()Editor_state.lines = load_array{'abc def ghi'}Text.redraw_all(Editor_state)Editor_state.cursor1 = {line=1, pos=9}Editor_state.screen_top1 = {line=1, pos=9}Editor_state.screen_bottom1 = {}edit.draw(Editor_state)-- pagedown makes no changeedit.run_after_keychord(Editor_state, 'pagedown')check_eq(Editor_state.screen_top1.line, 1, 'F - test_pagedown_never_moves_up/screen_top:line')check_eq(Editor_state.screen_top1.pos, 9, 'F - test_pagedown_never_moves_up/screen_top:pos')end - replacement in text.lua at line 20
local screen_line_starting_pos = 1local screen_line_starting_pos = State.screen_top1.pos