revert previous commit
[?]
Jun 10, 2022, 8:59 PM
SR7L4QPZ5JPBFC26VOYIXJHUROBC7EW52V2QM2JOF4JWTSTEUKOQCDependencies
- [2]
WIDXZBNWexperiment: extremely precise scrolling on paste - [3]
SN2QONLIautosave on cut/paste - [4]
NQWWTGXRswitch undo/redo to ctrl- hotkeys - [5]
LS55YKGWswitch copy/paste to ctrl- hotkeys - [6]
65XHTZEKregression: couldn't do many drawing operations because line.y was reset - [7]
BTKAW76Lrename - [8]
5ZFHMYQI. - [9]
3TDOZESEextract scrolling logic out of insert_return - [10]
Z4XRNDTRfind text - [11]
IRCKL6VNextract scrolling logic out of insert_at_cursor - [*]
OTIBCAUJlove2d scaffold
Change contents
- edit in main.lua at line 431
local draw_fn = App.drawApp.draw = nil -- disable temporarily - edit in main.lua at line 435
draw_fn() - edit in main.lua at line 442
draw_fn() - replacement in main.lua at line 449
App.draw = draw_fn-- 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