From 3be413602a59ed735a33712380cedbdb8f5603df Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 20 Jun 2022 10:48:35 -0700 Subject: bugfix: typing should delete highlighted text The test harness now also mimics real usage more precisely. --- app.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app.lua') diff --git a/app.lua b/app.lua index a887588..e5be2b0 100644 --- a/app.lua +++ b/app.lua @@ -232,14 +232,19 @@ function App.mouse_y() return App.fake_mouse_state.y end +-- all textinput events are also keypresses function App.run_after_textinput(t) + App.keypressed(t) App.textinput(t) + App.keyreleased(t) App.screen.contents = {} App.draw() end -function App.run_after_keychord(key) - App.keychord_pressed(key) +-- not all keys are textinput +function App.run_after_keychord(chord) + App.keychord_pressed(chord) + App.keyreleased(chord) App.screen.contents = {} App.draw() end -- cgit 1.4.1-2-gfad0