diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2024-02-04 17:39:15 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2024-02-04 17:39:15 -0800 |
commit | d27c03373ccf10e3f0ee7b4e613099062062036e (patch) | |
tree | f7637d1f58e53005265af33a581297fb960082fb /edit.lua | |
parent | dedb843535f3a4fc1a1f9f71100c80fc1e5d87e4 (diff) | |
parent | 77e1b57446cdaae1853896d78f0dece6ee7a94cb (diff) | |
download | view.love-d27c03373ccf10e3f0ee7b4e613099062062036e.tar.gz |
Merge text.love
Diffstat (limited to 'edit.lua')
-rw-r--r-- | edit.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/edit.lua b/edit.lua index b8f44f6..e8c4deb 100644 --- a/edit.lua +++ b/edit.lua @@ -247,7 +247,7 @@ function edit.keychord_press(State, chord, key) -- 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) and - chord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and chord ~= 'delete' and chord ~= 'C-z' and chord ~= 'C-y' and not App.is_cursor_movement(chord) then + chord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and chord ~= 'delete' and chord ~= 'C-z' and chord ~= 'C-y' and not App.is_cursor_movement(key) then Text.delete_selection(State, State.left, State.right) end if State.search_term then @@ -345,9 +345,9 @@ function edit.run_after_text_input(State, t) end -- not all keys are text_input -function edit.run_after_keychord(State, chord) - edit.keychord_press(State, chord) - edit.key_release(State, chord) +function edit.run_after_keychord(State, chord, key) + edit.keychord_press(State, chord, key) + edit.key_release(State, key) App.screen.contents = {} edit.update(State, 0) edit.draw(State) |