mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
+ chg: allow each modification step to split undo typing sequence (set timeout < 20ms)
This commit is contained in:
parent
6e4497c70a
commit
4ee2d3876f
@ -1 +1 @@
|
||||
2599
|
||||
2600
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<assemblyIdentity
|
||||
name="Notepad3"
|
||||
processorArchitecture="*"
|
||||
version="5.19.827.2599"
|
||||
version="5.19.827.2600"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Notepad3 BETA</description>
|
||||
|
||||
@ -631,10 +631,8 @@ void LoadSettings()
|
||||
FileWatching.AutoReloadTimeout = Settings2.AutoReloadTimeout;
|
||||
|
||||
Defaults2.UndoRedoSplitTimeout = 0UL;
|
||||
Settings2.UndoRedoSplitTimeout = IniSectionGetInt(Settings2_Section, L"UndoRedoSplitTimeout", Defaults2.UndoRedoSplitTimeout);
|
||||
if (Settings2.UndoRedoSplitTimeout != 0) {
|
||||
Settings2.UndoRedoSplitTimeout = clampul(Settings2.UndoRedoSplitTimeout, 100UL, 86400000UL); // max: 24h
|
||||
}
|
||||
Settings2.UndoRedoSplitTimeout = clampul(IniSectionGetInt(Settings2_Section, L"UndoRedoSplitTimeout",
|
||||
Defaults2.UndoRedoSplitTimeout), 0UL, 86400000UL);
|
||||
|
||||
// deprecated
|
||||
Defaults.RenderingTechnology = IniSectionGetInt(Settings2_Section, L"SciDirectWriteTech", -111);
|
||||
|
||||
@ -459,6 +459,7 @@ static int msgcmp(void* mqc1, void* mqc2)
|
||||
}
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define _MQ_IMMEDIATE (2 * USER_TIMER_MINIMUM - 1)
|
||||
#define _MQ_ms(T) ((T) / USER_TIMER_MINIMUM)
|
||||
|
||||
static void _MQ_AppendCmd(CmdMessageQueue_t* const pMsgQCmd, int cycles)
|
||||
@ -6976,7 +6977,7 @@ inline static LRESULT _MsgNotifyLean(const LPNMHDR pnmh, const SCNotification* c
|
||||
_SaveRedoSelection(_SaveUndoSelection());
|
||||
}
|
||||
}
|
||||
if (Settings2.UndoRedoSplitTimeout != 0) {
|
||||
if (Settings2.UndoRedoSplitTimeout > _MQ_IMMEDIATE) {
|
||||
_DelayUndoRedoTypingSequenceSplit(Settings2.UndoRedoSplitTimeout);
|
||||
}
|
||||
bModified = false; // not yet
|
||||
@ -6991,7 +6992,12 @@ inline static LRESULT _MsgNotifyLean(const LPNMHDR pnmh, const SCNotification* c
|
||||
RestoreAction(scn->token, REDO);
|
||||
}
|
||||
}
|
||||
if (bModified) { _SetSaveNeededFlag(true); }
|
||||
if (bModified) {
|
||||
if ((Settings2.UndoRedoSplitTimeout > 0UL) && (Settings2.UndoRedoSplitTimeout <= _MQ_IMMEDIATE)) {
|
||||
SciCall_BeginUndoAction(); SciCall_EndUndoAction();
|
||||
}
|
||||
_SetSaveNeededFlag(true);
|
||||
}
|
||||
}
|
||||
else if (pnmh->code == SCN_SAVEPOINTREACHED) {
|
||||
_SetSaveNeededFlag(false);
|
||||
@ -7063,7 +7069,7 @@ static LRESULT _MsgNotifyFromEdit(HWND hwnd, const LPNMHDR pnmh, const SCNotific
|
||||
_SaveRedoSelection(_SaveUndoSelection());
|
||||
}
|
||||
}
|
||||
if (Settings2.UndoRedoSplitTimeout != 0) {
|
||||
if (Settings2.UndoRedoSplitTimeout > _MQ_IMMEDIATE) {
|
||||
_DelayUndoRedoTypingSequenceSplit(Settings2.UndoRedoSplitTimeout);
|
||||
}
|
||||
bModified = false; // not yet
|
||||
@ -7085,6 +7091,9 @@ static LRESULT _MsgNotifyFromEdit(HWND hwnd, const LPNMHDR pnmh, const SCNotific
|
||||
if (scn->linesAdded != 0) {
|
||||
UpdateMarginWidth();
|
||||
}
|
||||
if ((Settings2.UndoRedoSplitTimeout > 0UL) && (Settings2.UndoRedoSplitTimeout <= _MQ_IMMEDIATE)) {
|
||||
SciCall_BeginUndoAction(); SciCall_EndUndoAction();
|
||||
}
|
||||
_SetSaveNeededFlag(true);
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#define VERSION_MAJOR 5
|
||||
#define VERSION_MINOR 19
|
||||
#define VERSION_REV 827
|
||||
#define VERSION_BUILD 2599
|
||||
#define VERSION_BUILD 2600
|
||||
#define SCINTILLA_VER 420
|
||||
#define ONIGURUMA_REGEX_VER 6.9.3
|
||||
#define UCHARDET_VER 2018.09.27
|
||||
|
||||
Loading…
Reference in New Issue
Block a user