aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2012-05-04 15:56:38 +1000
committernyamatongwe <unknown>2012-05-04 15:56:38 +1000
commit714dc7340d1255ae4018e1ceb793e25cb12cb74f (patch)
tree1abdc34f345fd353f149de0cb686bba89662c138
parent348a16981892aaabd9dcb34c21fb30009c9d829a (diff)
downloadscintilla-mirror-714dc7340d1255ae4018e1ceb793e25cb12cb74f.tar.gz
Bug #3522251. SCI_NEWLINE with multiple selections now only replaces the
main selection.
-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) {