bugfix: don't delete selection when moving cursor
[?]
Jun 23, 2022, 7:05 PM
7EQLPB3O4DPUWGILY4P5D32SSIKL63QWWU5XRL2HISGNJXFWD2SACDependencies
- [2]
KMRJOSLYbugfix: delete selection before pasting - [3]
YTSPVDZHfirst successful pagedown test, first bug found by test - [4]
ESETRNLBbugfix: printing the first part of a line at the bottom made it seem non-wrapping - [5]
Z4XRNDTRfind text - [6]
65XHTZEKregression: couldn't do many drawing operations because line.y was reset - [7]
JCSLDGAHbeginnings of support for multiple shapes - [8]
5FW7YOFThighlight selection while dragging - [9]
OYXDYPGSget rid of debug variables - [10]
G3C4FKPRbugfix: missed fixing a callsite - [11]
AVTNUQYRbasic test-enabled framework - [*]
LXTTOB33extract a couple of files - [*]
EMHRPJ3Rno, that's not right - [*]
FYS7TCDWbugfix - [*]
OTIBCAUJlove2d scaffold - [*]
6LJZN727handle chords - [*]
ZLJGZYQGselect text with shift + mouseclick - [*]
3HDWCPDIbugfix: include shift keys in modifier_down
Change contents
- edit in text_tests.lua at line 209
endfunction test_cursor_movement_without_shift_resets_selection()io.write('\ntest_cursor_movement_without_shift_resets_selection')-- display a line of text with some part selectedApp.screen.init{width=80, height=80}Lines = load_array{'abc'}Line_width = 75Cursor1 = {line=1, pos=1}Selection1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.draw()-- press an arrow key without shiftApp.run_after_keychord('right')-- no change to data, selection is resetcheck_nil(Selection1.line, 'F - test_cursor_movement_without_shift_resets_selection')check_eq(Lines[1].data, 'abc', 'F - test_cursor_movement_without_shift_resets_selection/data') - replacement in main.lua at line 417
if Selection1.line and not App.shift_down() and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and backspace ~= 'delete' thenif Selection1.line and not App.shift_down() and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and backspace ~= 'delete' and not App.is_cursor_movement(chord) then - edit in keychord.lua at line 50[18.1962][19.180]
endfunction App.is_cursor_movement(key)return array.find({'left', 'right', 'up', 'down', 'home', 'end', 'pageup', 'pagedown'}, key)