bugfix: don't rely on Screen_bottom1 while scrolling
[?]
May 23, 2022, 3:52 PM
U7M4M2F7P5TGLTHKQ7J72GQFNPBII4PLJVJ44YVVOYEI4KPUDI6ACDependencies
- [2]
YTSPVDZHfirst successful pagedown test, first bug found by test - [3]
242L3OQXbugfix: ensure Cursor_line is always on a text line - [4]
BYG5CEMVsupport for naming points - [5]
QYIFOHW3first test! - [6]
2RXZ3PGObeginning of a new approach to scroll+wrap - [7]
3QNOKBFMbeginnings of a test harness - [8]
PFT5Y2ZYmove - [9]
DLQMM265scroll past first page - [10]
AVTNUQYRbasic test-enabled framework - [*]
BULPIBEGbeginnings of a module for the text editor - [*]
3TFEAQSWstart using some globals - [*]
OTIBCAUJlove2d scaffold - [*]
7IKRRESBlonger names for indices in long loops - [*]
IRV65LZPfold variables for screen dimensions into the app framework - [*]
CVGE3SIGI feel confident now that page-down is working.
Change contents
- edit in text.lua at line 12
print('text.draw') - replacement in text.lua at line 130
App.screen.init{width=50, height=45}Lines = load_array{'abc','```lines', '```','def','ghi'}App.screen.init{width=50, height=80}Lines = load_array{'abc', -- height 15'```lines', '```', -- height 25'def', -- height 15'ghi'} -- height 15 - replacement in text.lua at line 142
local drawing_height = App.screen.width / 2 -- default-- initially the screen displays the first line and part of the drawinglocal text height = 15local drawing_height = 20 + App.screen.width / 2 -- default-- initially the screen displays the first line and the drawing-- 15px margin + 15px line1 + 10px margin + 25px drawing + 10px margin = 75px < screen height 80px - edit in text.lua at line 150
-- 15px margin + 10px margin + 25px drawing + 10px margin + 15px line3 = 75px < screen height 80px - edit in text.lua at line 152
print('test: top:', Screen_top1.line) - edit in text.lua at line 155
y = y + line_heightApp.screen.check(y, 'ghi', 'F - test_pagedown_skip_drawings/screen:2') - edit in text.lua at line 424
local y = 15 -- top margin - edit in text.lua at line 429
print('cursor skips', Cursor1.line)y = y + 20 + Drawing.pixels(Lines[Cursor1.line].h) - replacement in text.lua at line 438
if Cursor1.line > Screen_bottom1.line then--? print(y, App.screen.height, App.screen.height-math.floor(15*Zoom))if y > App.screen.height - math.floor(15*Zoom) then--? if Cursor1.line > Screen_bottom1.line then - edit in main.lua at line 125
print(y, line_index, line) - edit in main.lua at line 128
print('a') - edit in main.lua at line 231
print('setting top to', Screen_bottom1.line) - edit in main.lua at line 233[17.562][3.9557]
print('setting top to', Screen_top1.line) - edit in main.lua at line 237
print('top now', Screen_top1.line) - replacement in app.lua at line 96
-- App.run_after_keypress('pagedown')-- App.run_after_keychord('pagedown')