switch undo/redo to ctrl- hotkeys
[?]
Jun 3, 2022, 6:48 AM
NQWWTGXRLSBASOSP75FPOSVYP664VYRFQH7MY5LALLIP2VEBQMCQCDependencies
- [2]
R6GUSTBYdefault font size and line-height - [3]
73OCE2MCafter much struggle, a brute-force undo - [4]
XNFTJHC4split keyboard handling between Text and Drawing - [5]
SQLVYKVJrename - [6]
CG3264MMmove - [7]
HOSPP2ANcrisp font rendering - [8]
YPHKZVWMextract a new variable - [9]
VJ77YABHmore efficient undo/redo - [*]
BULPIBEGbeginnings of a module for the text editor - [*]
OTIBCAUJlove2d scaffold - [*]
Z4XRNDTRfind text
Change contents
- replacement in text.lua at line 1171
App.run_after_keychord('M-z')App.run_after_keychord('C-z') - replacement in text.lua at line 1206
App.run_after_keychord('M-z')App.run_after_keychord('C-z') - edit in text.lua at line 1382[3.583]→[3.7107:7450](∅→∅),[3.2102]→[3.7107:7450](∅→∅),[3.7107]→[3.7107:7450](∅→∅),[3.7450]→[3.2103:2149](∅→∅),[3.2149]→[3.7520:7761](∅→∅),[3.7520]→[3.7520:7761](∅→∅),[3.7761]→[3.2150:2196](∅→∅),[3.2196]→[3.8113:8121](∅→∅),[3.8113]→[3.8113:8121](∅→∅)
-- undo/redo really belongs in main.lua, but it's here so I can test the-- text-specific portions of itelseif chord == 'M-z' thenlocal event = undo_event()if event thenlocal src = event.beforeScreen_top1 = deepcopy(src.screen_top)Cursor1 = deepcopy(src.cursor)Selection1 = deepcopy(src.selection)patch(Lines, event.after, event.before)endelseif chord == 'M-y' thenlocal event = redo_event()if event thenlocal src = event.afterScreen_top1 = deepcopy(src.screen_top)Cursor1 = deepcopy(src.cursor)Selection1 = deepcopy(src.selection)patch(Lines, event.before, event.after)end - edit in main.lua at line 279[2.265][13.3819]
elseif chord == 'C-z' thenlocal event = undo_event()if event thenlocal src = event.beforeScreen_top1 = deepcopy(src.screen_top)Cursor1 = deepcopy(src.cursor)Selection1 = deepcopy(src.selection)patch(Lines, event.after, event.before)endelseif chord == 'C-y' thenlocal event = redo_event()if event thenlocal src = event.afterScreen_top1 = deepcopy(src.screen_top)Cursor1 = deepcopy(src.cursor)Selection1 = deepcopy(src.selection)patch(Lines, event.before, event.after)end