aboutsummaryrefslogtreecommitdiff
path: root/plugins/lfautoinsert.lua
diff options
context:
space:
mode:
authorrxi <rxi@users.noreply.github.com>2020-05-30 08:56:10 +0100
committerrxi <rxi@users.noreply.github.com>2020-05-30 08:56:10 +0100
commit28dcd2863440d9c00f259d4aa06ecc6cd1863288 (patch)
tree68d1c8f4478e4f5d1192f3207a150f30bc39456a /plugins/lfautoinsert.lua
parenta6723638699352c0f428eee3a40d30bc18b485ce (diff)
downloadlite-xl-plugins-28dcd2863440d9c00f259d4aa06ecc6cd1863288.tar.gz
lite-xl-plugins-28dcd2863440d9c00f259d4aa06ecc6cd1863288.zip
Updated lfautoinsert
Diffstat (limited to 'plugins/lfautoinsert.lua')
-rw-r--r--plugins/lfautoinsert.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/lfautoinsert.lua b/plugins/lfautoinsert.lua
index 067b414..2c59e41 100644
--- a/plugins/lfautoinsert.lua
+++ b/plugins/lfautoinsert.lua
@@ -46,6 +46,9 @@ command.add("core.docview", {
command.perform("doc:newline")
core.active_view:on_text_input(close)
command.perform("doc:move-to-previous-line")
+ if doc.lines[line+1] == doc.lines[line+2] then
+ doc:remove(line+1, 1, line+2, 1)
+ end
end
command.perform("doc:indent")
end