From b8d78f00d74c2d7b6887b0d4e8192dccd546c39f Mon Sep 17 00:00:00 2001 From: Oliver Geer Date: Fri, 18 Jul 2025 14:58:24 +0100 Subject: [PATCH] Make completely blank newline remove indentation on created lines below it (Fixes #140) --- plugins/indent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/indent.js b/plugins/indent.js index 2e67ac6..865e624 100644 --- a/plugins/indent.js +++ b/plugins/indent.js @@ -218,7 +218,7 @@ codeInput.plugins.Indent = class extends codeInput.Plugin { // find the index of the line our cursor is currently on for (let i = 0; i < lines.length; i++) { letterI += lines[i].length + 1; - if(inputElement.selectionEnd <= letterI) { + if(inputElement.selectionEnd < letterI) { currentLineI = i; break; }