From f577de4c5862f52d423d6ae0ebfe0914d54d2660 Mon Sep 17 00:00:00 2001 From: RaiKoHoff Date: Thu, 27 Feb 2020 15:51:34 +0100 Subject: [PATCH] + fix: drag&drop rectangular selection shuffles chars --- Versions/build.txt | 2 +- res/Notepad3.exe.manifest.conf | 2 +- src/Notepad3.c | 12 ++---------- src/VersionEx.h | 2 +- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/Versions/build.txt b/Versions/build.txt index 00750edc0..b8626c4cf 100644 --- a/Versions/build.txt +++ b/Versions/build.txt @@ -1 +1 @@ -3 +4 diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf index 1f4cae451..ed7f28704 100644 --- a/res/Notepad3.exe.manifest.conf +++ b/res/Notepad3.exe.manifest.conf @@ -3,7 +3,7 @@ Notepad3 RC2 diff --git a/src/Notepad3.c b/src/Notepad3.c index 9d46a75be..7a238f63c 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -7046,11 +7046,7 @@ inline static LRESULT _MsgNotifyLean(const LPNMHDR pnmh, const SCNotification* c if ((iModType & SC_MOD_BEFOREINSERT) || ((iModType & SC_MOD_BEFOREDELETE))) { if (!((iModType & SC_PERFORMED_UNDO) || (iModType & SC_PERFORMED_REDO))) { if ((!_InUndoRedoTransaction() && !SciCall_IsSelectionEmpty()) || Sci_IsMultiOrRectangleSelection()) { - int const token = _SaveUndoSelection(); - if (!Sci_IsMultiOrRectangleSelection()) { - SciCall_ReplaceSel(""); - } - _SaveRedoSelection(token); + _SaveRedoSelection(_SaveUndoSelection()); } } bModified = false; // not yet @@ -7145,11 +7141,7 @@ static LRESULT _MsgNotifyFromEdit(HWND hwnd, const LPNMHDR pnmh, const SCNotific if ((iModType & SC_MOD_BEFOREINSERT) || ((iModType & SC_MOD_BEFOREDELETE))) { if (!((iModType & SC_PERFORMED_UNDO) || (iModType & SC_PERFORMED_REDO))) { if ((!_InUndoRedoTransaction() && !SciCall_IsSelectionEmpty()) || Sci_IsMultiOrRectangleSelection()) { - int const token = _SaveUndoSelection(); - if (!Sci_IsMultiOrRectangleSelection()) { - SciCall_ReplaceSel(""); - } - _SaveRedoSelection(token); + _SaveRedoSelection(_SaveUndoSelection()); } } bModified = false; // not yet diff --git a/src/VersionEx.h b/src/VersionEx.h index a31bd1289..85abd2ebe 100644 --- a/src/VersionEx.h +++ b/src/VersionEx.h @@ -9,7 +9,7 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 20 #define VERSION_REV 227 -#define VERSION_BUILD 3 +#define VERSION_BUILD 4 #define SCINTILLA_VER 430 #define ONIGURUMA_REGEX_VER 6.9.4 #define UCHARDET_VER 2018.09.27