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/sort.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/sort.lua')
-rw-r--r-- | plugins/sort.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/sort.lua b/plugins/sort.lua index 1ad4034..b933bb4 100644 --- a/plugins/sort.lua +++ b/plugins/sort.lua @@ -11,9 +11,9 @@ local function split_lines(text) return res end -command.add("core.docview", { - ["sort:sort"] = function() - local doc = core.active_view.doc +command.add("core.docview!", { + ["sort:sort"] = function(dv) + local doc = dv.doc local l1, c1, l2, c2, swap = doc:get_selection(true) l1, c1 = translate.start_of_line(doc, l1, c1) |