aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2012-05-04 15:56:38 +1000
committernyamatongwe <devnull@localhost>2012-05-04 15:56:38 +1000
commit244dfd4b3b95d1aa044299ac609a882497fbc1d1 (patch)
tree3b9b9d2183a34da37877329de4c06edf71dd998e /src
parent478b63831772784fb5ef84bef168a4056d1ff7a9 (diff)
downloadscintilla-mirror-244dfd4b3b95d1aa044299ac609a882497fbc1d1.tar.gz
Bug #3522251. SCI_NEWLINE with multiple selections now only replaces the
main selection.
Diffstat (limited to 'src')
-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) {