Skip to content

Commit

Permalink
Fix rectangular selection copy-paste bug
Browse files Browse the repository at this point in the history
Restore old paste into rectangular selection behavior: only call pasteIntoMultiSelection for multiple stream selections and not for rectangular selections.

Fix #15139, fix #15151, close #15261
  • Loading branch information
Coises authored and donho committed Jun 12, 2024
1 parent dc53d1b commit f2e5739
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PowerEditor/src/NppCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,8 @@ void Notepad_plus::command(int id)
size_t nbSelections = _pEditView->execute(SCI_GETSELECTIONS);
Buffer* buf = getCurrentBuffer();
bool isRO = buf->isReadOnly();
if (nbSelections > 1 && !isRO)
LRESULT selectionMode = _pEditView->execute(SCI_GETSELECTIONMODE);
if (nbSelections > 1 && !isRO && selectionMode == SC_SEL_STREAM)
{
bool isPasteDone = _pEditView->pasteToMultiSelection();
if (isPasteDone)
Expand Down

0 comments on commit f2e5739

Please sign in to comment.