From fe53edc97ee2da0d91fd4382adcc1481ef5e2aed Mon Sep 17 00:00:00 2001 From: Georgi Kirilov <> Date: Sat, 31 Oct 2020 11:50:54 +0200 Subject: [PATCH] better cursor pos when "Deleting into" a quasilist Always jump _exactly_ to the beginning of the quasilist, regardless of where in the opening delimiter the cursor was on initially. Obviously, this only applies when the opening delimiter is longer that one char - ;;;, #| --- node.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node.lua b/node.lua index 235105a..35ea3fc 100644 --- a/node.lua +++ b/node.lua @@ -353,7 +353,7 @@ local function root_new(opposite) if start <= range.start and finish < range.finish then coroutine.yield({start = finish, finish = t.finish + 1, closing = true}) elseif start > range.start and t.finish >= range.finish then - coroutine.yield({start = t.start, finish = start, opening = true}) + coroutine.yield({start = math.max(range.start, t.start), finish = start, opening = true}) end end end -- 2.11.4.GIT