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/markers.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/markers.lua') diff --git a/plugins/markers.lua b/plugins/markers.lua index e2ec68e..d1a3aae 100644 --- a/plugins/markers.lua +++ b/plugins/markers.lua @@ -61,9 +61,9 @@ function DocView:draw_line_gutter(line, x, y, width) end -command.add("core.docview", { - ["markers:toggle-marker"] = function() - local doc = core.active_view.doc +command.add("core.docview!", { + ["markers:toggle-marker"] = function(dv) + local doc = dv.doc local line = doc:get_selection() local markers = cache[doc] @@ -74,8 +74,8 @@ command.add("core.docview", { end end, - ["markers:go-to-next-marker"] = function() - local doc = core.active_view.doc + ["markers:go-to-next-marker"] = function(dv) + local doc = dv.doc local line = doc:get_selection() local markers = cache[doc] -- cgit v1.2.3