From 8e9c410d275cafd2435a92360a383149c43d3eb5 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sat, 14 Aug 2021 08:59:37 -0400 Subject: [PATCH] Fixed multilne cursors at the edges of docuemnts. --- data/core/commands/doc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/core/commands/doc.lua b/data/core/commands/doc.lua index 60a913ce..f64fd416 100644 --- a/data/core/commands/doc.lua +++ b/data/core/commands/doc.lua @@ -73,7 +73,7 @@ end local function split_cursor(direction) local new_cursors = {} for _, line1, col1 in doc():get_selections() do - if line1 > 1 and line1 < #doc().lines then + if line1 + direction >= 1 and line1 + direction <= #doc().lines then table.insert(new_cursors, { line1 + direction, col1 }) end end