+ fix: "mark occurrences of curent word"

This commit is contained in:
Rainer Kottenhoff 2019-05-22 08:28:52 +02:00
parent f48d6d7e6f
commit 0eb77bda2c
2 changed files with 3 additions and 3 deletions

View File

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

View File

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