aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAdam <adamdharrison@gmail.com>2021-12-29 12:11:40 -0500
committerGitHub <noreply@github.com>2021-12-29 12:11:40 -0500
commit5143c44d33aeaf1319ffef2cfb36bd09520f55b0 (patch)
tree32ff73e43bdcd57a243ba58f33dcc3660d8ba13f /plugins
parenta831c9b9528e59fdeebae971691e85c53bdf44ac (diff)
parent4365480f9112f18043233c42ec099e6bb9c96db4 (diff)
downloadlite-xl-plugins-5143c44d33aeaf1319ffef2cfb36bd09520f55b0.tar.gz
lite-xl-plugins-5143c44d33aeaf1319ffef2cfb36bd09520f55b0.zip
Merge pull request #10 from SpotlightKid/fix/sort-doc-replace-func-return-values
fix: [sort] func passed to Doc:replace must have two return values
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sort.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/sort.lua b/plugins/sort.lua
index fd9d044..6c65149 100644
--- a/plugins/sort.lua
+++ b/plugins/sort.lua
@@ -24,7 +24,7 @@ command.add("core.docview", {
local head, body, foot = text:match("(\n*)(.-)(\n*)$")
local lines = split_lines(body)
table.sort(lines, function(a, b) return a:lower() < b:lower() end)
- return head .. table.concat(lines, "\n") .. foot
+ return head .. table.concat(lines, "\n") .. foot, 1
end)
end,
})