diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-04-08 21:55:12 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-04-08 21:55:51 -0700 |
commit | c969fcdd8574b42fd48e0695ea556a643aedb7c1 (patch) | |
tree | 599903ab7e0c1b4a5ed93df0ff85888fc3d60c3d | |
parent | 282983d0848db077c0dd6400a6f29b34f78f5806 (diff) | |
download | lines.love-c969fcdd8574b42fd48e0695ea556a643aedb7c1.tar.gz |
enhance bugfix of commit a9aa3436f (Dec 2024)
Scenario: * start out with some text on screen * select some text A, delete * select some more text B, delete * press C-z twice to restore A and B * press C-y twice Before this commit only the first C-y was having an effect (deleting B). The second was failing to delete A.
-rw-r--r-- | edit.lua | 2 | ||||
-rw-r--r-- | source_edit.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/edit.lua b/edit.lua index 7fb02ca..0f5bef5 100644 --- a/edit.lua +++ b/edit.lua @@ -344,7 +344,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 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(chord) then Text.delete_selection(State, State.left, State.right) end if State.search_term then diff --git a/source_edit.lua b/source_edit.lua index ceb2f43..58b1ccc 100644 --- a/source_edit.lua +++ b/source_edit.lua @@ -345,7 +345,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 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(chord) then Text.delete_selection(State, State.left, State.right) end if State.search_term then |