From 8b9dab0c3650586053ab7aec76c8197d13993b64 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 23 Dec 2022 20:42:12 -0800 Subject: overzealous search-and-replace --- source_text_tests.lua | 2 +- text_tests.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source_text_tests.lua b/source_text_tests.lua index 64f041f..795fc0c 100644 --- a/source_text_tests.lua +++ b/source_text_tests.lua @@ -607,7 +607,7 @@ function test_select_text() edit.run_after_keychord(Editor_state, 'S-right') App.fake_key_release('lshift') edit.key_release(Editor_state, 'lshift') - -- selection persists even after shift is release + -- selection persists even after shift is released check_eq(Editor_state.selection1.line, 1, 'F - test_select_text/selection:line') check_eq(Editor_state.selection1.pos, 1, 'F - test_select_text/selection:pos') check_eq(Editor_state.cursor1.line, 1, 'F - test_select_text/cursor:line') diff --git a/text_tests.lua b/text_tests.lua index c0104ad..1d5113f 100644 --- a/text_tests.lua +++ b/text_tests.lua @@ -607,7 +607,7 @@ function test_select_text() edit.run_after_keychord(Editor_state, 'S-right') App.fake_key_release('lshift') edit.key_release(Editor_state, 'lshift') - -- selection persists even after shift is release + -- selection persists even after shift is released check_eq(Editor_state.selection1.line, 1, 'F - test_select_text/selection:line') check_eq(Editor_state.selection1.pos, 1, 'F - test_select_text/selection:pos') check_eq(Editor_state.cursor1.line, 1, 'F - test_select_text/cursor:line') -- cgit 1.4.1-2-gfad0 From 7ef551b8210ecf0bfee32430f70543d68d4cc5f4 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 23 Dec 2022 20:43:30 -0800 Subject: another missed rename --- main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.lua b/main.lua index 8270858..35f4e72 100644 --- a/main.lua +++ b/main.lua @@ -227,9 +227,9 @@ end function App.mousepressed(x,y, mouse_button) --? print('mouse press', x,y) if Current_app == 'run' then - if run.mouse_pressed then run.mouse_press(x,y, mouse_button) end + if run.mouse_press then run.mouse_press(x,y, mouse_button) end elseif Current_app == 'source' then - if source.mouse_pressed then source.mouse_press(x,y, mouse_button) end + if source.mouse_press then source.mouse_press(x,y, mouse_button) end else assert(false, 'unknown app "'..Current_app..'"') end -- cgit 1.4.1-2-gfad0 From f351ee2f8f87fc8f84385ba1215be4e56f805ada Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 23 Dec 2022 20:43:37 -0800 Subject: fix some arg names --- main.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.lua b/main.lua index 35f4e72..8e61b5f 100644 --- a/main.lua +++ b/main.lua @@ -209,16 +209,16 @@ function App.textinput(t) end end -function App.keyreleased(chord, key) +function App.keyreleased(key, scancode) -- ignore events for some time after window in focus (mostly alt-tab) if Current_time < Last_focus_time + 0.01 then return end -- if Current_app == 'run' then - if run.key_release then run.key_release(chord, key) end + if run.key_release then run.key_release(key, scancode) end elseif Current_app == 'source' then - if source.key_release then source.key_release(chord, key) end + if source.key_release then source.key_release(key, scancode) end else assert(false, 'unknown app "'..Current_app..'"') end -- cgit 1.4.1-2-gfad0