bugfix: typing should delete highlighted text
[?]
Jun 20, 2022, 5:48 PM
VG75U7IM2ZQTGM2QETDT6QQ4CSLQPB4APK436POAAQJWOMINPIJACDependencies
- [2]
FYS7TCDWbugfix - [3]
BYG5CEMVsupport for naming points - [4]
MP2TBKU6bugfix: crash in Text.up() after return - [5]
PX7DDEMOautosave slightly less aggressively - [6]
JCSLDGAHbeginnings of support for multiple shapes - [7]
AVTNUQYRbasic test-enabled framework - [8]
6E3HVYWFtest and App helper for mouse clicks - [9]
65XHTZEKregression: couldn't do many drawing operations because line.y was reset - [10]
XNFTJHC4split keyboard handling between Text and Drawing - [11]
TVM2WIHHbugfix: autosave and undo in a couple of cases - [12]
HRWN5V6JDevine's suggestion to try to live with just freehand - [13]
YTSPVDZHfirst successful pagedown test, first bug found by test - [*]
LXTTOB33extract a couple of files - [*]
4VKEE43Zbugfix - [*]
OTIBCAUJlove2d scaffold - [*]
JRLBUB6Lmore intuitive point delete from polygons - [*]
3QNOKBFMbeginnings of a test harness
Change contents
- edit in text_tests.lua at line 207
function test_edit_deletes_selection()io.write('\ntest_edit_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()-- press a keyApp.run_after_textinput('x')-- selected text is deleted and replaced with the keycheck_eq(Lines[1].data, 'xbc', 'F - test_edit_deletes_selection')end - edit in main.lua at line 410
if not App.shift_down() thenSelection1 = {}end - edit in main.lua at line 540
record_undo_event({before=before, after=snapshot(Lines.current_drawing_index)}) - edit in main.lua at line 545
record_undo_event({before=before, after=snapshot(Lines.current_drawing_index)}) - edit in main.lua at line 547
record_undo_event({before=before, after=snapshot(Lines.current_drawing_index)}) - edit in main.lua at line 552
endif not App.shift_down() thenSelection1 = {} - edit in main.lua at line 556
if not App.shift_down() thenSelection1 = {}end - edit in app.lua at line 235
-- all textinput events are also keypresses - edit in app.lua at line 237
App.keypressed(t) - edit in app.lua at line 239
App.keyreleased(t) - replacement in app.lua at line 244
function App.run_after_keychord(key)App.keychord_pressed(key)-- not all keys are textinputfunction App.run_after_keychord(chord)App.keychord_pressed(chord)App.keyreleased(chord)