aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorrxi <rxi@users.noreply.github.com>2020-06-13 10:18:26 +0100
committerrxi <rxi@users.noreply.github.com>2020-06-13 10:18:26 +0100
commit61decc3456e609c9e2ec7132ac58d80e7af5f916 (patch)
tree3b90dc9c47fd98b682d78cc95ab2eb779080e30c /plugins
parentc98a80d4aa74f6c24f6b38d7245afa65e08e2408 (diff)
downloadlite-xl-plugins-61decc3456e609c9e2ec7132ac58d80e7af5f916.tar.gz
lite-xl-plugins-61decc3456e609c9e2ec7132ac58d80e7af5f916.zip
Updated lfautoinsert to handle trailing text properly
Diffstat (limited to 'plugins')
-rw-r--r--plugins/lfautoinsert.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/lfautoinsert.lua b/plugins/lfautoinsert.lua
index 39715b3..0ea7b9d 100644
--- a/plugins/lfautoinsert.lua
+++ b/plugins/lfautoinsert.lua
@@ -49,6 +49,9 @@ command.add("core.docview", {
if doc.lines[line+1] == doc.lines[line+2] then
doc:remove(line+1, 1, line+2, 1)
end
+ elseif col < #doc.lines[line] then
+ command.perform("doc:newline")
+ command.perform("doc:move-to-previous-line")
end
command.perform("doc:indent")
end