bugfix: printing the first part of a line at the bottom made it seem non-wrapping
[?]
May 22, 2022, 5:08 AM
ESETRNLB3MIJ2SID6HJMMP52FEVUBLGK2HLWD75KDQZAKQMKSF2QCDependencies
- [2]
PGZJ6NATensure Filename is writable when opened outside a terminal - [3]
CVGE3SIGI feel confident now that page-down is working. - [4]
AIRIP35Zcleaner - [5]
PWHZPJJMalways show current filename in window title - [6]
WLHI7KD3new globals: draw partial screen line up top - [7]
537TQ2QNsome more logging - [8]
BULPIBEGbeginnings of a module for the text editor - [9]
M36DBSDEbit more polish to help screen - [10]
2FBLO5FHadjust window size - [11]
2KRK3OBVdon't rely on defaults - [12]
242L3OQXbugfix: ensure Cursor_line is always on a text line - [13]
XNFTJHC4split keyboard handling between Text and Drawing - [14]
DLQMM265scroll past first page - [15]
TRNWIQN6more precise height calculation when scrolling up as much as possible while keeping cursor on screen - [16]
OTIBCAUJlove2d scaffold - [17]
SVJZZDC3snapshot - no, that's all wrong - [18]
MGT5FTJ3first stab at supporting wrapping in cursor up - [19]
AVQ5MC5Dfinish uppercasing all globals - [20]
KJKKASHZreduce ambitions a bit: page up/down need not start screen from the middle of a line - [21]
W4UVZETR2 regressions: - [22]
JY4VK7L2rename - [23]
PYGMASTVdisable some debug prints - [24]
DXT4QTAHa few more integer coordinates - [25]
PR4KIAZDfirst stab at equally hacky cursor down support - [26]
2RXZ3PGObeginning of a new approach to scroll+wrap - [27]
LUNH47XXmake text and drawings the same width - [28]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [29]
2POFQQLWkeep cursor on screen when pressing 'down' - [30]
YKRF5V3Zstarting to load/save - [*]
BOFNXP5Gclicking now moves the cursor even on long, wrapped lines - [*]
UWNHC4AAredo y computations - [*]
7IKRRESBlonger names for indices in long loops - [*]
4C375P53this is a bit clearer - [*]
6LJZN727handle chords
Change contents
- replacement in text.lua at line 31
if y + math.floor(15*Zoom) > Screen_height thenreturn y, screen_line_starting_posendif New_foo then print('text: new screen line', y, Screen_height, screen_line_starting_pos) end - edit in text.lua at line 40
endif line_index > Screen_top1.line or pos > Screen_top1.pos thenif y + math.floor(15*Zoom) >= Screen_height thenreturn y, screen_line_starting_posend - edit in text.lua at line 285
print('down', Cursor1.line, Cursor1.pos, Screen_top1.line, Screen_top1.pos, Screen_bottom1.line, Screen_bottom1.pos) - replacement in text.lua at line 288
--? print('down: cursor at final screen line of its line')print('cursor at final screen line of its line')--? os.exit(1) - replacement in text.lua at line 296
--? print(Cursor1.pos)print(Cursor1.pos) - edit in text.lua at line 300
--? print(Cursor1.line, Cursor1.pos, Screen_bottom1.line) - replacement in text.lua at line 301
--? print('screen top before:', Screen_top1.line, Screen_top1.pos)print('screen top before:', Screen_top1.line, Screen_top1.pos) - replacement in text.lua at line 303
--? print('scroll up preserving cursor')print('scroll up preserving cursor') - replacement in text.lua at line 305
--? print('screen top after:', Screen_top1.line, Screen_top1.pos)print('screen top after:', Screen_top1.line, Screen_top1.pos) - edit in text.lua at line 307
--? print('=>', Cursor1.line, Cursor1.pos, Screen_bottom1.line) - replacement in text.lua at line 309
--? print('cursor is NOT at final screen line of its line')print('cursor is NOT at final screen line of its line') - replacement in text.lua at line 312
--? print('switching pos of screen line at cursor from '..tostring(screen_line_starting_pos)..' to '..tostring(new_screen_line_starting_pos))print('switching pos of screen line at cursor from '..tostring(screen_line_starting_pos)..' to '..tostring(new_screen_line_starting_pos)) - replacement in text.lua at line 315
--? print('cursor pos is now '..tostring(Cursor1.pos))print('cursor pos is now '..tostring(Cursor1.pos)) - replacement in text.lua at line 317
--? print('scroll up preserving cursor')print('scroll up preserving cursor') - replacement in text.lua at line 319
--? print('screen top after:', Screen_top1.line, Screen_top1.pos)print('screen top after:', Screen_top1.line, Screen_top1.pos) - edit in text.lua at line 321
print('=>', Cursor1.line, Cursor1.pos, Screen_top1.line, Screen_top1.pos, Screen_bottom1.line, Screen_bottom1.pos) - edit in text.lua at line 343
print(screen_lines[#screen_lines], Cursor1.pos) - replacement in text.lua at line 366[5.589]→[5.190:266](∅→∅),[5.266]→[5.6953:7075](∅→∅),[5.1718]→[5.383:455](∅→∅),[5.7075]→[5.383:455](∅→∅),[5.383]→[5.383:455](∅→∅)
local cursor_pos_screen_lines = Text.pos_at_start_of_cursor_screen_line()--? print('cursor pos '..tostring(Cursor1.pos)..' is on the #'..tostring(cursor_pos_screen_lines)..' screen line down')local y = Screen_height - cursor_pos_screen_lines*math.floor(15*Zoom)local cursor2 = Text.to2(Cursor1)print('cursor pos '..tostring(Cursor1.pos)..' is on the #'..tostring(cursor2.screen_line)..' screen line down')local y = Screen_height - cursor2.screen_pos*math.floor(15*Zoom) - replacement in text.lua at line 372
--? print('y', y)print('y', y) - replacement in text.lua at line 382
--? print('height:', h)print('height:', h) - replacement in text.lua at line 490
if Line[pos1.line].screen_line_starting_pos == nil thenif Lines[pos1.line].screen_line_starting_pos == nil then - edit in main.lua at line 66
New_foo = true - replacement in main.lua at line 71
love.window.setMode(0, 0) -- maximizeScreen_width, Screen_height, Screen_flags = love.window.getMode()-- shrink slightly to account for window decorationScreen_width = Screen_width-100Screen_height = Screen_height-100--? love.window.setMode(0, 0) -- maximize--? Screen_width, Screen_height, Screen_flags = love.window.getMode()--? -- shrink slightly to account for window decoration--? Screen_width = Screen_width-100--? Screen_height = Screen_height-100 - replacement in main.lua at line 77
--? Screen_width = 120--? Screen_height = 200Screen_width = 120Screen_height = 200 - replacement in main.lua at line 81
--? Line_width = 100Line_width = math.floor(Screen_width/2/40)*40Line_width = 100--? Line_width = math.floor(Screen_width/2/40)*40 - edit in main.lua at line 121
if New_foo then print('== draw') end - edit in main.lua at line 123
if New_foo then print('draw:', line_index, y) end - edit in main.lua at line 147
if New_foo then print('text') end - edit in main.lua at line 151
if New_foo then print('aa', y) end - edit in main.lua at line 155
New_foo = false - edit in main.lua at line 196[36.123][5.4920]
New_foo = true