From 9bf5649c7df6bbd746956e9a96b616f61a59fa9b Mon Sep 17 00:00:00 2001 From: Guldoman Date: Wed, 2 Nov 2022 08:10:57 +0100 Subject: Use new `command.add` syntax (#136) --- plugins/bracketmatch.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/bracketmatch.lua') 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, }) -- cgit v1.2.3