aboutsummaryrefslogtreecommitdiff
path: root/plugins/bracketmatch.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/bracketmatch.lua
parent49139e03398c9d0ecb347267a4882a4eb3f7ee23 (diff)
downloadlite-xl-plugins-9bf5649c7df6bbd746956e9a96b616f61a59fa9b.tar.gz
lite-xl-plugins-9bf5649c7df6bbd746956e9a96b616f61a59fa9b.zip
Use new `command.add` syntax (#136)
Diffstat (limited to 'plugins/bracketmatch.lua')
-rw-r--r--plugins/bracketmatch.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/bracketmatch.lua b/plugins/bracketmatch.lua
index 6119330..c32a428 100644
--- a/plugins/bracketmatch.lua
+++ b/plugins/bracketmatch.lua
@@ -245,16 +245,16 @@ end
command.add("core.docview", {
- ["bracket-match:move-to-matching"] = function()
+ ["bracket-match:move-to-matching"] = function(dv)
update_state()
if state.line2 then
- core.active_view.doc:set_selection(state.line2, state.col2)
+ dv.doc:set_selection(state.line2, state.col2)
end
end,
- ["bracket-match:select-to-matching"] = function()
+ ["bracket-match:select-to-matching"] = function(dv)
update_state()
if state.line2 then
- core.active_view.doc:set_selection(state.line, state.col, state.line2, state.col2 + select_adj)
+ dv.doc:set_selection(state.line, state.col, state.line2, state.col2 + select_adj)
end
end,
})