mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-17 21:03:19 +08:00
+ fix: "mark occurrences of curent word"
This commit is contained in:
parent
f48d6d7e6f
commit
0eb77bda2c
@ -6528,7 +6528,7 @@ void EditMarkAll(HWND hwnd, char* pszFind, int flags, DocPos rangeStart, DocPos
|
||||
DocPos const iWordStart = SciCall_WordStartPosition(iCurrPos, true);
|
||||
DocPos const iWordEnd = SciCall_WordEndPosition(iCurrPos, true);
|
||||
iFindLength = (iWordEnd - iWordStart);
|
||||
StringCchCopyNA(pszText, HUGE_BUFFER, SciCall_GetRangePointer(iWordStart, iFindLength), iFindLength);
|
||||
StringCchCopyNA(txtBuffer, COUNTOF(txtBuffer), SciCall_GetRangePointer(iWordStart, iFindLength), iFindLength);
|
||||
}
|
||||
else {
|
||||
return; // no selection and no word mark chosen
|
||||
|
||||
@ -6627,7 +6627,7 @@ LRESULT MsgNotify(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
// clear marks only, if selection changed
|
||||
if (iUpd & SC_UPDATE_SELECTION)
|
||||
{
|
||||
if (!SciCall_IsSelectionEmpty()) {
|
||||
if (!SciCall_IsSelectionEmpty() || Settings.MarkOccurrencesCurrentWord) {
|
||||
MarkAllOccurrences(Settings2.UpdateDelayMarkAllOccurrences, true);
|
||||
}
|
||||
else {
|
||||
@ -6637,8 +6637,8 @@ LRESULT MsgNotify(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
else if (iUpd & SC_UPDATE_CONTENT) {
|
||||
// ignoring SC_UPDATE_CONTENT cause Style and Marker are out of scope here
|
||||
// using WM_COMMAND -> SCEN_CHANGE instead!
|
||||
//~~~UpdateVisibleUrlIndics();
|
||||
//~~~MarkAllOccurrences(Settings2.UpdateDelayMarkAllCoccurrences, false);
|
||||
//~~~UpdateVisibleUrlIndics();
|
||||
}
|
||||
}
|
||||
UpdateToolbar();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user