mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
Merge remote-tracking branch 'notepad3_orig_rizone/master' into Future_Dev_Master
This commit is contained in:
commit
f9cfbbbb20
@ -11,7 +11,6 @@ SettingsVersion=5
|
||||
;TimeStampFormat= (-> $Date: %s $) {Print format should fit to TimeStampRegEx}
|
||||
;DefaultDirectory=
|
||||
;DefaultExtension=txt
|
||||
;DefaultWindowPosition=
|
||||
;DenyVirtualSpaceAccess=0
|
||||
;filebrowser.exe=minipath.exe
|
||||
;grepWin.exe=grepWinNP3.exe
|
||||
@ -111,8 +110,11 @@ SettingsVersion=5
|
||||
;28=History
|
||||
;29=Always On Top
|
||||
;30=Search in Files
|
||||
[Custom Colors]
|
||||
[Styles]
|
||||
[Window]
|
||||
;<ResX>x<ResY> DefaultWindowPosition=
|
||||
[Suppressed Messages]
|
||||
[Custom Colors]
|
||||
[Common Base]
|
||||
[2nd Common Base]
|
||||
[Text Files]
|
||||
@ -169,8 +171,6 @@ SettingsVersion=5
|
||||
[Web Source Code]
|
||||
[XML Document]
|
||||
[YAML]
|
||||
[Window]
|
||||
[Suppressed Messages]
|
||||
[Recent Files]
|
||||
[Recent Find]
|
||||
[Recent Replace]
|
||||
|
||||
@ -4760,6 +4760,7 @@ void DialogNewWindow(HWND hwnd, bool bSaveOnRunTools, const HPATHL hFilePath, WI
|
||||
if (Path_IsNotEmpty(hFilePath)) {
|
||||
HPATHL hfile_pth = Path_Copy(hFilePath);
|
||||
Path_QuoteSpaces(hfile_pth, true);
|
||||
StrgCat(hparam_str, L" ");
|
||||
StrgCat(hparam_str, Path_Get(hfile_pth));
|
||||
Path_Release(hfile_pth);
|
||||
}
|
||||
|
||||
@ -11101,7 +11101,6 @@ bool FileLoad(const HPATHL hfile_pth, const FileLoadFlags fLoadFlags)
|
||||
if (SciCall_GetZoom() != 100) {
|
||||
ShowZoomCallTip();
|
||||
}
|
||||
ResetFileObservationData(true);
|
||||
|
||||
UndoRedoReset();
|
||||
|
||||
@ -11256,6 +11255,10 @@ bool FileLoad(const HPATHL hfile_pth, const FileLoadFlags fLoadFlags)
|
||||
_ResetFileWatchingMode();
|
||||
}
|
||||
}
|
||||
|
||||
// consistent settings file handling (if loaded in editor)
|
||||
Flags.bSettingsFileSoftLocked = (Path_StrgComparePathNormalized(Paths.CurrentFile, Paths.IniFile) == 0);
|
||||
|
||||
InstallFileWatching(true);
|
||||
|
||||
// the .LOG feature ...
|
||||
@ -11279,8 +11282,6 @@ bool FileLoad(const HPATHL hfile_pth, const FileLoadFlags fLoadFlags)
|
||||
EditSetSelectionEx(iAnchorPos, iCaretPos, -1, -1);
|
||||
}
|
||||
|
||||
// consistent settings file handling (if loaded in editor)
|
||||
Flags.bSettingsFileSoftLocked = (StringCchCompareXIW(Path_Get(Paths.CurrentFile), Path_Get(Paths.IniFile)) == 0);
|
||||
UpdateSaveSettingsCmds();
|
||||
if (SciCall_GetZoom() != 100) {
|
||||
ShowZoomCallTip();
|
||||
@ -11714,9 +11715,7 @@ bool FileSave(FileSaveFlags fSaveFlags)
|
||||
LONG const answer = InfoBoxLng(typ, L"ReloadExSavedCfg", IDS_MUI_RELOADSETTINGS, tch);
|
||||
if (IsYesOkay(answer)) {
|
||||
///~SaveAllSettings(true); ~ already saved (CurrentFile)
|
||||
HPATHL hempty_pth = Path_Allocate(NULL);
|
||||
DialogNewWindow(Globals.hwndMain, false, hempty_pth, NULL);
|
||||
Path_Release(hempty_pth);
|
||||
DialogNewWindow(Globals.hwndMain, false, Paths.CurrentFile, NULL);
|
||||
CloseApplication();
|
||||
}
|
||||
}
|
||||
@ -12425,6 +12424,11 @@ void InstallFileWatching(const bool bInstall) {
|
||||
static HANDLE _hObserverThread = INVALID_HANDLE_VALUE;
|
||||
static HANDLE _hCurrFileHandle = INVALID_HANDLE_VALUE; // exclusive lock
|
||||
|
||||
// don't install FileWathing on own Settings IniFile
|
||||
if (bInstall && Flags.bSettingsFileSoftLocked) {
|
||||
return;
|
||||
}
|
||||
|
||||
HPATHL hdir_pth = Path_Copy(Paths.CurrentFile);
|
||||
Path_RemoveFileSpec(hdir_pth);
|
||||
|
||||
@ -12446,6 +12450,8 @@ void InstallFileWatching(const bool bInstall) {
|
||||
// Terminate previous watching
|
||||
if (bTerminate) {
|
||||
|
||||
ResetFileObservationData(true);
|
||||
|
||||
KillTimer(Globals.hwndMain, ID_WATCHTIMER);
|
||||
|
||||
if (IS_VALID_HANDLE(_hObserverThread)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user