aboutsummaryrefslogtreecommitdiff
path: root/plugins/primary_selection.lua
diff options
context:
space:
mode:
authorGuldoman <giulio.lettieri@gmail.com>2022-11-02 08:10:57 +0100
committerGitHub <noreply@github.com>2022-11-02 08:10:57 +0100
commit9bf5649c7df6bbd746956e9a96b616f61a59fa9b (patch)
tree725e2d12dc826f8ebe73807a705371cb4c5af4d9 /plugins/primary_selection.lua
parent49139e03398c9d0ecb347267a4882a4eb3f7ee23 (diff)
downloadlite-xl-plugins-9bf5649c7df6bbd746956e9a96b616f61a59fa9b.tar.gz
lite-xl-plugins-9bf5649c7df6bbd746956e9a96b616f61a59fa9b.zip
Use new `command.add` syntax (#136)
Diffstat (limited to 'plugins/primary_selection.lua')
-rw-r--r--plugins/primary_selection.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/primary_selection.lua b/plugins/primary_selection.lua
index 388caf0..4f8d71a 100644
--- a/plugins/primary_selection.lua
+++ b/plugins/primary_selection.lua
@@ -154,7 +154,7 @@ end
command.add("core.docview", {
- ["primary-selection:paste"] = function(x, y, clicks, ...)
+ ["primary-selection:paste"] = function(dv, x, y, clicks, ...)
if not config.plugins.primary_selection.command_out
or #config.plugins.primary_selection.command_out == 0 then
core.warn("No primary selection paste command set")
@@ -176,7 +176,7 @@ command.add("core.docview", {
table.insert(text, buffer or "")
until not buffer
if #text > 0 then
- core.active_view.doc:text_input(table.concat(text))
+ dv.doc:text_input(table.concat(text))
end
end
})