From f2e5739d4d55da92ac240d38d6323e57abe92840 Mon Sep 17 00:00:00 2001 From: Coises Date: Sun, 9 Jun 2024 09:54:39 -0700 Subject: [PATCH] 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 --- PowerEditor/src/NppCommands.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index d8e62828e..f5e00d7ee 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -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)