From 88f2125daff1bc326e467685fde1a85baa3804a7 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 8 Nov 2023 21:11:37 +0100 Subject: [PATCH] Make multi-select Copy/Paste behaviour as same as column edit's one Copy some multi-select texts and paste them make all text glued all together. This commit makes pasted texts separated by EOL, as column selection's Copy/Paste behaviour. Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14266#issuecomment-1799203336 --- scintilla/src/Editor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index a9cd01062c41..c488d416ee5f 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/src/Editor.cxx @@ -4337,12 +4337,12 @@ void Editor::CopySelectionRange(SelectionText *ss, bool allowLineCopy) { std::sort(rangesInOrder.begin(), rangesInOrder.end()); for (const SelectionRange ¤t : rangesInOrder) { text.append(RangeText(current.Start().Position(), current.End().Position())); - if (sel.selType == Selection::SelTypes::rectangle) { + //if (sel.selType == Selection::SelTypes::rectangle) { if (pdoc->eolMode != EndOfLine::Lf) text.push_back('\r'); if (pdoc->eolMode != EndOfLine::Cr) text.push_back('\n'); - } + //} } ss->Copy(text, pdoc->dbcsCodePage, vs.styles[StyleDefault].characterSet, sel.IsRectangular(), sel.selType == Selection::SelTypes::lines);