bugfix: typing a capital letter deletes selection
[?]
Jun 27, 2022, 12:07 AM
CIQN2MDEMWAASJAHOHMUZTI5PF4JV5SZSOBYYDCIIFYO2VHWULKACDependencies
- [2]
7EQLPB3Obugfix: don't delete selection when moving cursor - [3]
OTIBCAUJlove2d scaffold - [4]
VHQCNMARseveral more modules - [5]
G3C4FKPRbugfix: missed fixing a callsite - [6]
EMHRPJ3Rno, that's not right - [7]
5FW7YOFThighlight selection while dragging - [8]
ESETRNLBbugfix: printing the first part of a line at the bottom made it seem non-wrapping - [9]
FYS7TCDWbugfix - [10]
KMRJOSLYbugfix: delete selection before pasting - [11]
6DE7RBZ6move mouse_released events to Drawing - [12]
JCSLDGAHbeginnings of support for multiple shapes - [13]
PX7DDEMOautosave slightly less aggressively - [14]
BYG5CEMVsupport for naming points - [15]
Z4XRNDTRfind text - [16]
65XHTZEKregression: couldn't do many drawing operations because line.y was reset - [17]
EF6MFB46assume we always have a filename - [18]
AVTNUQYRbasic test-enabled framework - [19]
HRWN5V6JDevine's suggestion to try to live with just freehand - [20]
ZX3VAHVUstop generating invalid keychords - [21]
YTSPVDZHfirst successful pagedown test, first bug found by test - [22]
6LJZN727handle chords - [23]
IFGAJAF7add a level of indirection to vertices of shapes - [24]
OYXDYPGSget rid of debug variables - [*]
LXTTOB33extract a couple of files - [*]
VG75U7IMbugfix: typing should delete highlighted text - [*]
4WAFGF4Zselection bugfix
Change contents
- edit in text_tests.lua at line 262[27.520][28.2]
endfunction test_edit_with_shift_key_deletes_selection()io.write('\ntest_edit_with_shift_key_deletes_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()-- mimic precise keypresses for a capital letterApp.fake_key_press('lshift')App.keypressed('d')App.textinput('D')App.keyreleased('d')App.fake_key_release('lshift')-- selected text is deleted and replaced with the keycheck_nil(Selection1.line, 'F - test_edit_with_shift_key_deletes_selection')check_eq(Lines[1].data, 'Dbc', 'F - test_edit_with_shift_key_deletes_selection/data') - replacement in main.lua at line 416
function App.keychord_pressed(chord)if 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) thenfunction App.keychord_pressed(chord, key)if Selection1.line and-- printable character created using shift key => delete selection-- (we're not creating any ctrl-shift- or alt-shift- combinations using regular/printable keys)(not App.shift_down() or utf8.len(key) == 1) andchord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and backspace ~= 'delete' and not App.is_cursor_movement(chord) then - replacement in keychord.lua at line 11
App.keychord_pressed(App.combine_modifiers(key))App.keychord_pressed(App.combine_modifiers(key), key)