Skip to content

Commit

Permalink
Make multi-select Copy/Paste behaviour as same as column edit's one
Browse files Browse the repository at this point in the history
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: notepad-plus-plus#14266 (comment)
  • Loading branch information
donho committed Nov 8, 2023
1 parent 69998ab commit 88f2125
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scintilla/src/Editor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4337,12 +4337,12 @@ void Editor::CopySelectionRange(SelectionText *ss, bool allowLineCopy) {
std::sort(rangesInOrder.begin(), rangesInOrder.end());
for (const SelectionRange &current : 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);
Expand Down

0 comments on commit 88f2125

Please sign in to comment.