From 28dcd2863440d9c00f259d4aa06ecc6cd1863288 Mon Sep 17 00:00:00 2001 From: rxi Date: Sat, 30 May 2020 08:56:10 +0100 Subject: Updated lfautoinsert --- plugins/lfautoinsert.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/lfautoinsert.lua') 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 -- cgit v1.2.3