From ebb193a0c5fc387dee872e630f81aac56b9e1bc0 Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Wed, 17 Nov 2021 12:06:05 +0100 Subject: [PATCH] +chg: switch to Scintilla default idle styling mode (none) --- src/Notepad3.c | 4 +--- src/Styles.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Notepad3.c b/src/Notepad3.c index f2b0fe54a..7cb2ac191 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -2015,9 +2015,7 @@ static void _InitializeSciEditCtrl(HWND hwndEditCtrl) SciCall_SetLayoutCache(SC_CACHE_PAGE); // Idle Styling (very large text) - //~~~SciCall_SetIdleStyling(SC_IDLESTYLING_NONE); // needed for focused view - //~~~SciCall_SetIdleStyling(SC_IDLESTYLING_AFTERVISIBLE); - SciCall_SetIdleStyling(SC_IDLESTYLING_ALL); + SciCall_SetIdleStyling(SC_IDLESTYLING_NONE); // needed for focused view SciCall_SetModEventMask(SCI_MODEVENTMASK_FULL); SciCall_SetCommandEvents(false); // speedup folding diff --git a/src/Styles.c b/src/Styles.c index 72fed080b..e170ef384 100644 --- a/src/Styles.c +++ b/src/Styles.c @@ -1676,7 +1676,7 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) SciCall_SetLayoutCache(SC_CACHE_PAGE); //~SC_CACHE_DOCUMENT ~ memory consumption ! SciCall_SetPositionCache(SciCall_GetPositionCache()); // clear - default=1024 - SciCall_SetIdleStyling(SC_IDLESTYLING_ALL); + SciCall_SetIdleStyling(Flags.bHugeFileLoadState ? SC_IDLESTYLING_TOVISIBLE : SC_IDLESTYLING_NONE); SciCall_StartStyling(0); //~SciCall_Colourise(0, -1);