diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-08-30 22:47:57 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-08-30 22:47:57 -0700 |
commit | 2dc1e690f08091851c79f7aba709ecd4603a7eef (patch) | |
tree | 67c22225ecc516ae63f0718854c74e2b11267976 /source_edit.lua | |
parent | 82b974af29f586b369a46783a969672a654ebf0f (diff) | |
parent | 1fc11feb28bf336f9a1d74e014ad4c7418001047 (diff) | |
download | view.love-2dc1e690f08091851c79f7aba709ecd4603a7eef.tar.gz |
Merge text.love
Diffstat (limited to 'source_edit.lua')
-rw-r--r-- | source_edit.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source_edit.lua b/source_edit.lua index 565b989..96bfb12 100644 --- a/source_edit.lua +++ b/source_edit.lua @@ -448,13 +448,13 @@ function edit.keychord_press(State, chord, key) elseif chord == 'C-c' then local s = Text.selection(State) if s then - App.setClipboardText(s) + App.set_clipboard(s) end elseif chord == 'C-x' then for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll local s = Text.cut_selection(State, State.left, State.right) if s then - App.setClipboardText(s) + App.set_clipboard(s) end schedule_save(State) elseif chord == 'C-v' then @@ -463,7 +463,7 @@ function edit.keychord_press(State, chord, key) -- and sometimes scroll when we didn't quite need to. local before_line = State.cursor1.line local before = snapshot(State, before_line) - local clipboard_data = App.getClipboardText() + local clipboard_data = App.get_clipboard() for _,code in utf8.codes(clipboard_data) do local c = utf8.char(code) if c == '\n' then |