scrolling with up arrow
[?]
May 23, 2022, 11:35 PM
A2NV3WVOKBOWBCSV3K4I6MO5LSVSSUZVNH226HV2HDCOMSPRVSSACDependencies
- [2]
MDXGMZU2disable all debug prints - [3]
537TQ2QNsome more logging - [4]
JY4VK7L2rename - [5]
CVGE3SIGI feel confident now that page-down is working. - [6]
ESETRNLBbugfix: printing the first part of a line at the bottom made it seem non-wrapping - [7]
QYIFOHW3first test! - [8]
WLHI7KD3new globals: draw partial screen line up top - [9]
S5VCAFKYcouple of tests for cursor down - [10]
2RXZ3PGObeginning of a new approach to scroll+wrap - [11]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [12]
YTSPVDZHfirst successful pagedown test, first bug found by test - [13]
XOAHJ6M3similar tests for cursor up - [14]
MGT5FTJ3first stab at supporting wrapping in cursor up - [15]
JRGTJ2IWquite the frustrating bugfix - [16]
IMEJA43Lsnapshot - [*]
BULPIBEGbeginnings of a module for the text editor
Change contents
- replacement in text.lua at line 32
-- don't update y above screen topif line_index > Screen_top1.line or pos >= Screen_top1.pos then-- update y only after drawing the first screen line of screen topif line_index > Screen_top1.line or (line_index == Screen_top1.line and pos > Screen_top1.pos) then - replacement in text.lua at line 35
if New_foo then print('text: new screen line', y, App.screen.height, screen_line_starting_pos) end--? print('text: new screen line', y, App.screen.height, screen_line_starting_pos) - replacement in text.lua at line 46
if line_index > Screen_top1.line or pos >= Screen_top1.pos thenif line_index > Screen_top1.line or (line_index == Screen_top1.line and pos > Screen_top1.pos) then - replacement in text.lua at line 56
if line_index > Screen_top1.line or pos >= Screen_top1.pos thenif line_index > Screen_top1.line or (line_index == Screen_top1.line and pos >= Screen_top1.pos) then - edit in text.lua at line 259
-- HERE - replacement in text.lua at line 359
-- display the lines 2/3/4 with the cursor on line 2App.screen.init{width=120, height=60}Lines = load_array{'abc', 'def', 'ghi', 'jkl'}-- display lines starting from the second screen line of line 3App.screen.init{width=25+30, height=60}Lines = load_array{'abc', 'def', 'ghi jkl', 'mno'} - replacement in text.lua at line 363
Cursor1 = {line=2, pos=1}Screen_top1 = {line=2, pos=1}Cursor1 = {line=3, pos=6}Screen_top1 = {line=3, pos=5} - replacement in text.lua at line 371
App.screen.check(y, 'def', 'F - test_up_arrow_scrolls_up_by_one_screen_line/baseline/screen:1')y = y + line_heightApp.screen.check(y, 'ghi', 'F - test_up_arrow_scrolls_up_by_one_screen_line/baseline/screen:2')App.screen.check(y, 'jkl', 'F - test_up_arrow_scrolls_up_by_one_screen_line/baseline/screen:1') - replacement in text.lua at line 373
App.screen.check(y, 'jkl', 'F - test_up_arrow_scrolls_up_by_one_screen_line/baseline/screen:3')App.screen.check(y, 'mno', 'F - test_up_arrow_scrolls_up_by_one_screen_line/baseline/screen:2') - replacement in text.lua at line 377
App.screen.check(y, 'abc', 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen:1')App.screen.check(y, 'ghi ', 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen:1') - replacement in text.lua at line 379
App.screen.check(y, 'def', 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen:2')App.screen.check(y, 'jkl', 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen:2') - replacement in text.lua at line 381
App.screen.check(y, 'ghi', 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen:3')check_eq(Screen_top1.line, 1, 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen_top')check_eq(Cursor1.line, 1, 'F - test_up_arrow_scrolls_up_by_one_screen_line/cursor')App.screen.check(y, 'mno', 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen:3')check_eq(Screen_top1.line, 3, 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen_top')check_eq(Screen_top1.pos, 1, 'F - test_up_arrow_scrolls_up_by_one_screen_line/screen_top')check_eq(Cursor1.line, 3, 'F - test_up_arrow_scrolls_up_by_one_screen_line/cursor')check_eq(Cursor1.pos, 1, 'F - test_up_arrow_scrolls_up_by_one_screen_line/cursor')