From 3541ab4aa1cec6ee77c4be8f8a39c189e62bae56 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Fri, 11 Jun 2021 19:01:43 -0400 Subject: [PATCH] Removed unecessary check. --- data/core/commands/doc.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/data/core/commands/doc.lua b/data/core/commands/doc.lua index 02f7551..d54eb05 100644 --- a/data/core/commands/doc.lua +++ b/data/core/commands/doc.lua @@ -69,14 +69,7 @@ end local function split_cursor(direction) local new_cursors = {} for _, line1, col1 in doc():get_selections() do - local exists = false - for _, line2, col2 in doc():get_selections() do - if line1+direction == line2 and col1 == col2 then - exists = true - break - end - end - if not exists and line1 > 1 and line1 < #doc().lines then + if line1 > 1 and line1 < #doc().lines then table.insert(new_cursors, { line1 + direction, col1 }) end end