Fix rectangular selection copy-paste bug

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
This commit is contained in:
Coises 2024-06-09 09:54:39 -07:00 committed by Don Ho
parent dc53d1b7a7
commit f2e5739d4d
1 changed files with 2 additions and 1 deletions

View File

@ -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)