aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Editor.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 467015a84..9a49580d2 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -5032,6 +5032,11 @@ void Editor::CancelModes() {
}
void Editor::NewLine() {
+ // Remove non-main ranges
+ InvalidateSelection(sel.RangeMain(), true);
+ sel.SetSelection(sel.RangeMain());
+
+ // Clear main range and insert line end
ClearSelection();
const char *eol = "\n";
if (pdoc->eolMode == SC_EOL_CRLF) {