From 75658b4f3f3ffb0b98cff88118032bd4e2c02e80 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Mon, 7 Jun 2021 08:26:49 -0400 Subject: [PATCH] Removed unecessary elses. --- data/core/doc/init.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/data/core/doc/init.lua b/data/core/doc/init.lua index 09816e4d..b448bbd4 100644 --- a/data/core/doc/init.lua +++ b/data/core/doc/init.lua @@ -455,13 +455,11 @@ function Doc:indent_text(unindent, line1, col1, line2, col2) if (unindent or in_beginning_whitespace) and not has_selection then local start_cursor = (se and se + 1 or 1) + l1d or #(self.lines[line1]) return line1, start_cursor, line2, start_cursor - else - return line1, col1 + l1d, line2, col2 + l2d end - else - self:insert(line1, col1, text) - return line1, col1 + #text, line1, col1 + #text + return line1, col1 + l1d, line2, col2 + l2d end + self:insert(line1, col1, text) + return line1, col1 + #text, line1, col1 + #text end -- For plugins to add custom actions of document change