From c973b076e1e1a24144e0d23daa7efdfbbd1cc749 Mon Sep 17 00:00:00 2001 From: Georgi Kirilov <> Date: Sat, 31 Oct 2020 11:50:54 +0200 Subject: [PATCH] fix electric RET with one-char long first element --- edit.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/edit.lua b/edit.lua index 998c9ba..91a64d9 100644 --- a/edit.lua +++ b/edit.lua @@ -174,8 +174,7 @@ function M.new(parser, walker, fmt, write, delete, eol_at) end local function refmt_at(scope, range, keep_electric_space) - if not range or not scope or not scope.start or not scope.finish or - (scope.finish - scope.start < 3) or scope.is_root then return range.start end + if not range or not scope or scope.is_root or (scope.finish - scope.start < 2) then return range.start end local parent = walker.sexp_at(scope, true) if not (parent and parent.is_list) then return range.start end local path = path_from(range) -- 2.11.4.GIT