mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-17 21:03:19 +08:00
+fix: occurrence counter for "current word" mode
+add: msg box for editing read-only
This commit is contained in:
parent
8467f05982
commit
2dc7b8a8a1
@ -180,6 +180,7 @@
|
||||
#define IDS_MUI_SELMULTI 14020
|
||||
#define IDS_MUI_SELRECTORMULTI 14021
|
||||
#define IDS_MUI_INIFILE_READONLY 14022
|
||||
#define IDS_MUI_DOCUMENT_READONLY 14023
|
||||
|
||||
#define IDS_MUI_ASK_SAVE 15000
|
||||
#define IDS_MUI_ASK_REVERT 15001
|
||||
|
||||
@ -205,6 +205,8 @@ BEGIN
|
||||
IDS_MUI_INF_PRSVFILEMODTM
|
||||
"Die Speicherung mit originalem Zeitstempel wurde aktiviert.\nDiese Option gilt nun für die gesamte Sitzung (Datei)!"
|
||||
IDS_MUI_OUT_OFF_OCCMRK "Es stehen keine weiteren Fundstellen Markierungen/Lesezeichen mehr zur Verfügung!"
|
||||
IDS_MUI_DOCUMENT_READONLY
|
||||
"Das Dokument ist im 'Nur Lesen' Modus gesperrt. Soll dieser Modus entsperrt werden?"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
|
||||
@ -205,6 +205,8 @@ BEGIN
|
||||
IDS_MUI_INF_PRSVFILEMODTM
|
||||
"Preserving original File Modification Timestamp enabled.\nThis option will stay for this session!"
|
||||
IDS_MUI_OUT_OFF_OCCMRK "Running out of Occurrence Markers (Bookmark/Highlight)!"
|
||||
IDS_MUI_DOCUMENT_READONLY
|
||||
"The document is locked for view only. Do you like to unlock it for editing?"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
|
||||
@ -7685,10 +7685,11 @@ void EditMarkAll(LPCWSTR wchFind, int sFlags, DocPos rangeStart, DocPos rangeEnd
|
||||
|
||||
if (StrIsNotEmpty(wchText)) {
|
||||
|
||||
DocPos const iSelStart = SciCall_GetSelectionStart();
|
||||
if (bMultiSel) {
|
||||
SciCall_ClearSelections();
|
||||
}
|
||||
DocPos const iSelStart = SciCall_GetSelectionStart();
|
||||
DocPos const iSelEnd = SciCall_GetSelectionEnd();
|
||||
|
||||
DocPos const iTextEnd = Sci_GetDocEndPosition();
|
||||
rangeStart = max_p(0, rangeStart);
|
||||
@ -7715,7 +7716,7 @@ void EditMarkAll(LPCWSTR wchFind, int sFlags, DocPos rangeStart, DocPos rangeEnd
|
||||
SciCall_MarkerAdd(SciCall_LineFromPosition(iPos), MARKER_NP3_OCCURRENCE);
|
||||
}
|
||||
++count;
|
||||
if (iSelStart == start) { found = count; }
|
||||
if ((iSelStart >= start) && (iSelEnd <= end)) { found = count; }
|
||||
start = end;
|
||||
end = rangeEnd;
|
||||
iPos = _FindInTarget(wchText, sFlags, &start, &end, true, FRMOD_NORM);
|
||||
|
||||
@ -8158,6 +8158,11 @@ inline static LRESULT _MsgNotifyLean(const SCNotification *const scn, bool* bMod
|
||||
if (FocusedView.HideNonMatchedLines) {
|
||||
EditToggleView(Globals.hwndEdit);
|
||||
}
|
||||
else {
|
||||
if (IsYesOkayRetryContinue(InfoBoxLng(MB_YESNO | MB_ICONINFORMATION, NULL, IDS_MUI_DOCUMENT_READONLY))) {
|
||||
SendWMCommand(Globals.hwndMain, IDM_VIEW_READONLY);
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
||||
default:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user