diff options
author | Guldoman <giulio.lettieri@gmail.com> | 2022-11-02 08:10:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 08:10:57 +0100 |
commit | 9bf5649c7df6bbd746956e9a96b616f61a59fa9b (patch) | |
tree | 725e2d12dc826f8ebe73807a705371cb4c5af4d9 /plugins/markers.lua | |
parent | 49139e03398c9d0ecb347267a4882a4eb3f7ee23 (diff) | |
download | lite-xl-plugins-9bf5649c7df6bbd746956e9a96b616f61a59fa9b.tar.gz lite-xl-plugins-9bf5649c7df6bbd746956e9a96b616f61a59fa9b.zip |
Use new `command.add` syntax (#136)
Diffstat (limited to 'plugins/markers.lua')
-rw-r--r-- | plugins/markers.lua | 10 |
1 files changed, 5 insertions, 5 deletions
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]
|