From 714dc7340d1255ae4018e1ceb793e25cb12cb74f Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 4 May 2012 15:56:38 +1000 Subject: Bug #3522251. SCI_NEWLINE with multiple selections now only replaces the main selection. --- src/Editor.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3