diff --git a/Versions/build.txt b/Versions/build.txt
index 32bb421c6..78d5c2a3d 100644
--- a/Versions/build.txt
+++ b/Versions/build.txt
@@ -1 +1 @@
-1729
+1730
diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf
index 3008656f7..e173a1755 100644
--- a/res/Notepad3.exe.manifest.conf
+++ b/res/Notepad3.exe.manifest.conf
@@ -3,7 +3,7 @@
Notepad3 RC
diff --git a/src/Edit.c b/src/Edit.c
index e734da41a..6d9452bb9 100644
--- a/src/Edit.c
+++ b/src/Edit.c
@@ -5256,20 +5256,8 @@ static INT_PTR CALLBACK EditFindReplaceDlgProcW(HWND hwnd,UINT umsg,WPARAM wPara
Settings.MarkOccurrencesMatchVisible = s_SaveMarkMatchVisible;
EnableCmd(GetMenu(Globals.hwndMain), IDM_VIEW_MARKOCCUR_ONOFF, true);
- // check if we had to revert FocusedView
if (FocusedView.HideNonMatchedLines) {
- if (!IsMarkOccurrencesEnabled() ||
- SciCall_IsSelectionEmpty() ||
- Settings.MarkOccurrencesMatchVisible ||
- Settings.MarkOccurrencesCurrentWord ||
- IsButtonChecked(hwnd, IDC_FINDSTART) ||
- IsButtonChecked(hwnd, IDC_FINDREGEXP) ||
- IsButtonChecked(hwnd, IDC_WILDCARDSEARCH) ||
- (Settings.MarkOccurrencesMatchWholeWords != IsButtonChecked(hwnd, IDC_FINDWORD)) ||
- (Settings.MarkOccurrencesMatchCase != IsButtonChecked(hwnd, IDC_FINDCASE)))
- {
- EditToggleView(sg_pefrData->hwnd);
- }
+ EditToggleView(sg_pefrData->hwnd);
}
if (IsMarkOccurrencesEnabled()) {
diff --git a/src/Notepad3.c b/src/Notepad3.c
index 7f73b9508..4f341beb3 100644
--- a/src/Notepad3.c
+++ b/src/Notepad3.c
@@ -1542,9 +1542,13 @@ static void _InitializeSciEditCtrl(HWND hwndEditCtrl)
SendMessage(hwndEditCtrl, SCI_SETSCROLLWIDTH, 1, 0);
SendMessage(hwndEditCtrl, SCI_SETSCROLLWIDTHTRACKING, true, 0);
SendMessage(hwndEditCtrl, SCI_SETENDATLASTLINE, true, 0);
+
SendMessage(hwndEditCtrl, SCI_SETMOUSESELECTIONRECTANGULARSWITCH, true, 0);
+
SendMessage(hwndEditCtrl, SCI_SETMULTIPLESELECTION, false, 0);
- SendMessage(hwndEditCtrl, SCI_SETADDITIONALSELECTIONTYPING, false, 0);
+ SendMessage(hwndEditCtrl, SCI_SETADDITIONALSELECTIONTYPING, true, 0);
+ SendMessage(hwndEditCtrl, SCI_SETMULTIPASTE, true, 0);
+
SendMessage(hwndEditCtrl, SCI_SETADDITIONALCARETSBLINK, true, 0);
SendMessage(hwndEditCtrl, SCI_SETADDITIONALCARETSVISIBLE, true, 0);
@@ -9527,35 +9531,29 @@ bool RestoreAction(int token, DoAction doAct)
// we are inside undo/redo transaction, so do delayed PostMessage() instead of SendMessage()
HWND const hwndedit = Globals.hwndEdit;
- DocPos const _anchorPos = (doAct == UNDO ? pSel->anchorPos_undo : pSel->anchorPos_redo);
- DocPos const _curPos = (doAct == UNDO ? pSel->curPos_undo : pSel->curPos_redo);
+ DocPos const anchorPos = (doAct == UNDO ? pSel->anchorPos_undo : pSel->anchorPos_redo);
+ DocPos const curPos = (doAct == UNDO ? pSel->curPos_undo : pSel->curPos_redo);
// Ensure that the first and last lines of a selection are always unfolded
// This needs to be done _before_ the SCI_SETSEL message
- DocLn const anchorPosLine = SciCall_LineFromPosition(_anchorPos);
- DocLn const currPosLine = SciCall_LineFromPosition(_curPos);
+ DocLn const anchorPosLine = SciCall_LineFromPosition(anchorPos);
+ DocLn const currPosLine = SciCall_LineFromPosition(curPos);
PostMessage(hwndedit, SCI_ENSUREVISIBLE, anchorPosLine, 0);
if (anchorPosLine != currPosLine) { PostMessage(hwndedit, SCI_ENSUREVISIBLE, currPosLine, 0); }
-
int const selectionMode = (doAct == UNDO ? pSel->selMode_undo : pSel->selMode_redo);
PostMessage(hwndedit, SCI_SETSELECTIONMODE, (WPARAM)selectionMode, 0);
// independent from selection mode
- PostMessage(hwndedit, SCI_SETANCHOR, (WPARAM)_anchorPos, 0);
- PostMessage(hwndedit, SCI_SETCURRENTPOS, (WPARAM)_curPos, 0);
-
switch (selectionMode)
{
- case SC_SEL_RECTANGLE:
- PostMessage(hwndedit, SCI_SETRECTANGULARSELECTIONANCHOR, (WPARAM)_anchorPos, 0);
- PostMessage(hwndedit, SCI_SETRECTANGULARSELECTIONCARET, (WPARAM)_curPos, 0);
- // fall-through
-
- case SC_SEL_THIN:
+ case SC_SEL_RECTANGLE:
+ case SC_SEL_THIN:
{
- DocPos const anchorVS = (doAct == UNDO ? pSel->anchorVS_undo : pSel->anchorVS_redo);
- DocPos const currVS = (doAct == UNDO ? pSel->curVS_undo : pSel->curVS_redo);
+ PostMessage(hwndedit, SCI_SETRECTANGULARSELECTIONANCHOR, (WPARAM)anchorPos, 0);
+ PostMessage(hwndedit, SCI_SETRECTANGULARSELECTIONCARET, (WPARAM)curPos, 0);
+ DocPos const anchorVS = (doAct == UNDO ? pSel->anchorVS_undo : pSel->anchorVS_redo);
+ DocPos const currVS = (doAct == UNDO ? pSel->curVS_undo : pSel->curVS_redo);
if ((anchorVS != 0) || (currVS != 0)) {
PostMessage(hwndedit, SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE, (WPARAM)anchorVS, 0);
PostMessage(hwndedit, SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE, (WPARAM)currVS, 0);
@@ -9563,11 +9561,12 @@ bool RestoreAction(int token, DoAction doAct)
}
break;
- case SC_SEL_LINES:
- case SC_SEL_STREAM:
- default:
- // nothing to do here
- break;
+ case SC_SEL_LINES:
+ case SC_SEL_STREAM:
+ default:
+ PostMessage(hwndedit, SCI_SETANCHOR, (WPARAM)anchorPos, 0);
+ PostMessage(hwndedit, SCI_SETCURRENTPOS, (WPARAM)curPos, 0);
+ break;
}
PostMessage(hwndedit, SCI_SCROLLCARET, 0, 0);
diff --git a/src/VersionEx.h b/src/VersionEx.h
index 556fef8b3..b1f543875 100644
--- a/src/VersionEx.h
+++ b/src/VersionEx.h
@@ -8,7 +8,7 @@
#define VERSION_MAJOR 5
#define VERSION_MINOR 19
#define VERSION_REV 526
-#define VERSION_BUILD 1729
+#define VERSION_BUILD 1730
#define SCINTILLA_VER 415+
#define ONIGMO_REGEX_VER 6.2.0
#define VERSION_PATCH RC