diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-07-08 15:30:10 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-07-08 15:30:10 -0700 |
commit | a27dd15c1f0e69d2259bcc9a7c246edcd7200f67 (patch) | |
tree | 7321d0ef4ff343cf24a019a65c877103fc03d234 /main.lua | |
parent | 0853a030ac72454f9aad775872b7c269d3969513 (diff) | |
download | text.love-a27dd15c1f0e69d2259bcc9a7c246edcd7200f67.tar.gz |
add args to some functions
- Text.clip_selection - Text.cut_selection - Text.delete_selection - Text.delete_selection_without_undo - Text.mouse_pos - Text.to_pos
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main.lua b/main.lua index 2c79b77..37d5d01 100644 --- a/main.lua +++ b/main.lua @@ -434,7 +434,7 @@ function App.keychord_pressed(chord, key) -- (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-c' and chord ~= 'C-x' and chord ~= 'backspace' and backspace ~= 'delete' and not App.is_cursor_movement(chord) then - Text.delete_selection() + Text.delete_selection(Margin_left, App.screen.width-Margin_right) end if Search_term then if chord == 'escape' then @@ -506,7 +506,7 @@ function App.keychord_pressed(chord, key) end elseif chord == 'C-x' then for _,line in ipairs(Lines) do line.y = nil end -- just in case we scroll - local s = Text.cut_selection() + local s = Text.cut_selection(Margin_left, App.screen.width-Margin_right) if s then App.setClipboardText(s) end |