more precise scroll on paste
[?]
Jun 10, 2022, 9:12 PM
T7IWZFL4NGMHUKNBXVXMC32AO4GC63WJDAOVOL6M6HIPANPNRCMACDependencies
- [2]
SR7L4QPZrevert previous commit - [3]
VC2CU2GGfaster paste - [4]
NQWWTGXRswitch undo/redo to ctrl- hotkeys - [5]
5ZFHMYQI. - [6]
SN2QONLIautosave on cut/paste - [7]
Z4XRNDTRfind text - [8]
WIDXZBNWexperiment: extremely precise scrolling on paste - [9]
LS55YKGWswitch copy/paste to ctrl- hotkeys - [10]
65XHTZEKregression: couldn't do many drawing operations because line.y was reset - [11]
IRCKL6VNextract scrolling logic out of insert_at_cursor - [12]
BTKAW76Lrename - [13]
3TDOZESEextract scrolling logic out of insert_return - [*]
OTIBCAUJlove2d scaffold - [*]
DHCLUDCW. - [*]
YPHKZVWMextract a new variable - [*]
XX7G2FFJintermingle freehand line drawings with text
Change contents
- edit in main.lua at line 209
Cursor_y = -1 - edit in main.lua at line 251[18.1302][15.410]
endif Cursor_y == -1 thenCursor_y = App.screen.height - edit in main.lua at line 434
local num_newlines = 0 -- hack 1--? print(Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos) - edit in main.lua at line 438
num_newlines = num_newlines+1 - edit in main.lua at line 446
--? print('=>', Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos) - edit in main.lua at line 447
-- hack 1: if we have too many newlines we definitely need to scrollfor i=before_line,Cursor1.line doLines[i].screen_line_starting_pos = nilText.populate_screen_line_starting_pos(i)endif Cursor1.line-Screen_top1.line+1 + num_newlines > App.screen.height/Line_height thenText.snap_cursor_to_bottom_of_screen()end-- hack 2: if we have too much text wrapping we definitely need to scrolllocal clipboard_text = App.newText(love.graphics.getFont(), clipboard_data)local clipboard_width = App.width(clipboard_text)--? print(Cursor_y, Cursor_y*Line_width, Cursor_y*Line_width+Cursor_x, Cursor_y*Line_width+Cursor_x+clipboard_width, Line_width*App.screen.height/Line_height)if Cursor_y*Line_width+Cursor_x + clipboard_width > Line_width*App.screen.height/Line_height thenText.snap_cursor_to_bottom_of_screen()end