Merge pull request #2275 from RaiKoHoff/grepWin_Integration

Fix lost Find/Replace dialog settings
This commit is contained in:
Rainer Kottenhoff 2020-04-28 13:40:43 +02:00 committed by GitHub
commit decfc4128b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 50 additions and 31 deletions

View File

@ -1 +1 @@
1
2

View File

@ -1,5 +1,9 @@
History
2020/04/26: Version 6.9.5 revised 1
2020/04/24: fix #192: Unexpected regex match
2020/04/20: Version 6.9.5
2020/04/12: Release Candidate 2 for Version 6.9.5

View File

@ -27,6 +27,12 @@ Supported character encodings:
* doc/SYNTAX.md: contributed by seanofw
Version 6.9.5 revised 1
-----------------------
* Fixed Issue #192
Version 6.9.5
-------------

View File

@ -657,8 +657,11 @@ static void
mmcl_alt_merge(MinMaxCharLen* to, MinMaxCharLen* alt)
{
if (to->min > alt->min) {
to->min = alt->min;
if (alt->min_is_sure != 0)
to->min = alt->min;
to->min_is_sure = alt->min_is_sure;
}
else if (to->min == alt->min) {
if (alt->min_is_sure != FALSE)
to->min_is_sure = TRUE;
}
@ -883,17 +886,17 @@ node_char_len1(Node* node, regex_t* reg, MinMaxCharLen* ci, ScanEnv* env,
}
break;
case NODE_GIMMICK:
mmcl_set(ci, 0);
break;
case NODE_ANCHOR:
zero:
mmcl_set(ci, 0);
/* can't optimize look-behind if anchor exists. */
ci->min_is_sure = FALSE;
break;
case NODE_GIMMICK:
zero:
mmcl_set(ci, 0);
break;
case NODE_BACKREF:
if (NODE_IS_CHECKER(node))
goto zero;
@ -7735,14 +7738,18 @@ print_indent_tree(FILE* f, Node* node, int indent)
break;
case NODE_CCLASS:
#define CCLASS_MBUF_MAX_OUTPUT_NUM 10
fprintf(f, "<cclass:%p>", node);
if (IS_NCCLASS_NOT(CCLASS_(node))) fputs(" not", f);
if (CCLASS_(node)->mbuf) {
BBuf* bbuf = CCLASS_(node)->mbuf;
for (i = 0; i < bbuf->used; i++) {
fprintf(f, " mbuf(%u) ", bbuf->used);
for (i = 0; i < bbuf->used && i < CCLASS_MBUF_MAX_OUTPUT_NUM; i++) {
if (i > 0) fprintf(f, ",");
fprintf(f, "%0x", bbuf->p[i]);
}
if (i < bbuf->used) fprintf(f, "...");
}
break;

View File

@ -3,7 +3,7 @@
<assemblyIdentity
name="Notepad3"
processorArchitecture="*"
version="5.20.428.1"
version="5.20.428.2"
type="win32"
/>
<description>Notepad3 BETA</description>

View File

@ -5843,6 +5843,7 @@ static INT_PTR CALLBACK EditFindReplaceDlgProcW(HWND hwnd,UINT umsg,WPARAM wPara
case WM_DESTROY:
{
_SetSearchFlags(hwnd, sg_pefrData); // sync
Settings.EFR_Data = *sg_pefrData; // remember options
if (!s_bSwitchedFindReplace)
{
@ -5904,7 +5905,7 @@ static INT_PTR CALLBACK EditFindReplaceDlgProcW(HWND hwnd,UINT umsg,WPARAM wPara
DeleteObject(hBrushBlue);
ResizeDlg_Destroy(hwnd, &Settings.FindReplaceDlgSizeX, NULL);
}
return false;
return 0;
case WM_SIZE: {

View File

@ -1793,18 +1793,21 @@ static void _SetWrapVisualFlags(HWND hwndEditCtrl)
//
static void _InitializeSciEditCtrl(HWND hwndEditCtrl)
{
if (IsWindowsVistaOrGreater()) {
// Current platforms perform window buffering so it is almost always better for this option to be turned off.
// There are some older platforms and unusual modes where buffering may still be useful - so keep it ON
//~SciCall_SetBufferedDraw(true); // default is true
if (Settings.RenderingTechnology > 0) {
SciCall_SetTechnology(s_DirectWriteTechnology[Settings.RenderingTechnology]);
SciCall_SetBufferedDraw(false);
// experimental
SciCall_SetBidirectional(s_SciBidirectional[Settings.Bidirectional]);
}
// Current platforms perform window buffering so it is almost always better for this option to be turned off.
// There are some older platforms and unusual modes where buffering may still be useful - so keep it ON
//~SCI_SETBUFFEREDDRAW(true); // default is true
if (Settings.RenderingTechnology > 0)
{
SendMessage(hwndEditCtrl, SCI_SETTECHNOLOGY, (WPARAM)s_DirectWriteTechnology[Settings.RenderingTechnology], 0);
SendMessage(hwndEditCtrl, SCI_SETBUFFEREDDRAW, 0, 0); // false
SendMessage(hwndEditCtrl, SCI_SETBIDIRECTIONAL, (WPARAM)s_SciBidirectional[Settings.Bidirectional], 0); // experimental
}
Encoding_Current(Settings.DefaultEncoding);
//~SendMessage(hwndEditCtrl, SCI_SETPHASESDRAW, SC_PHASES_TWO, 0); // (= default)
SendMessage(hwndEditCtrl, SCI_SETPHASESDRAW, SC_PHASES_MULTIPLE, 0);
//~SendMessage(hwndEditCtrl, SCI_SETLAYOUTCACHE, SC_CACHE_PAGE, 0);
SendMessage(hwndEditCtrl, SCI_SETLAYOUTCACHE, SC_CACHE_DOCUMENT, 0);
//~SendMessage(hwndEditCtrl, SCI_SETPOSITIONCACHE, 1024, 0); // default = 1024
SendMessage(hwndEditCtrl, SCI_SETPOSITIONCACHE, 4096, 0);
//int const evtMask = SC_MODEVENTMASKALL;
// The possible notification types are the same as the modificationType bit flags used by SCN_MODIFIED:
@ -1821,9 +1824,6 @@ static void _InitializeSciEditCtrl(HWND hwndEditCtrl)
SendMessage(hwndEditCtrl, SCI_SETMODEVENTMASK, (WPARAM)(evtMask1 | evtMask2), 0);
SendMessage(hwndEditCtrl, SCI_SETCOMMANDEVENTS, false, 0); // speedup folding
SendMessage(hwndEditCtrl, SCI_SETCODEPAGE, (WPARAM)SC_CP_UTF8, 0); // fixed internal UTF-8 (Sci:default)
SendMessage(hwndEditCtrl, SCI_SETLAYOUTCACHE, SC_CACHE_PAGE, 0);
//SendMessage(hwndEditCtrl, SCI_SETLAYOUTCACHE, SC_CACHE_DOCUMENT, 0);
//SendMessage(hwndEditCtrl, SCI_SETPHASESDRAW, SC_PHASES_MULTIPLE, 0); // default: SC_PHASES_TWO
SendMessage(hwndEditCtrl, SCI_SETEOLMODE, Settings.DefaultEOLMode, 0);
SendMessage(hwndEditCtrl, SCI_SETPASTECONVERTENDINGS, true, 0);
@ -1843,10 +1843,10 @@ static void _InitializeSciEditCtrl(HWND hwndEditCtrl)
SendMessage(hwndEditCtrl, SCI_SETADDITIONALCARETSBLINK, true, 0);
SendMessage(hwndEditCtrl, SCI_SETADDITIONALCARETSVISIBLE, true, 0);
SendMessage(hwndEditCtrl, SCI_SETIDLESTYLING, SC_IDLESTYLING_NONE, 0); // needed for focused view
// Idle Styling (very large text)
//~~~SendMessage(hwndEditCtrl, SCI_SETIDLESTYLING, SC_IDLESTYLING_AFTERVISIBLE, 0);
//~~~SendMessage(hwndEditCtrl, SCI_SETIDLESTYLING, SC_IDLESTYLING_ALL, 0);
SendMessage(hwndEditCtrl, SCI_SETIDLESTYLING, SC_IDLESTYLING_NONE, 0); // needed for focused view
// assign command keys
SendMessage(hwndEditCtrl, SCI_ASSIGNCMDKEY, (SCK_NEXT + (SCMOD_CTRL << 16)), SCI_PARADOWN);
@ -2092,6 +2092,8 @@ LRESULT MsgCreate(HWND hwnd, WPARAM wParam,LPARAM lParam)
}
Style_SetDefaultLexer(Globals.hwndEdit);
Encoding_Current(Settings.DefaultEncoding);
ObserveNotifyChangeEvent();
return 0LL;

View File

@ -805,7 +805,6 @@ void Style_ToIniSection(bool bForceAll)
// cleanup old (< v4) stuff
IniSectionDelete(L"Default Text", NULL, true);
IniSectionDelete(L"2nd Default Text", NULL, true);
}
@ -1495,10 +1494,10 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew)
Style_SetInvisible(hwnd, false); // set fixed invisible style
SciCall_StartStyling(0);
_OBSERVE_NOTIFY_CHANGE_;
SciCall_StartStyling(0);
// apply lexer styles
if (Flags.bLargeFileLoaded)
{

View File

@ -9,11 +9,11 @@
#define VERSION_MAJOR 5
#define VERSION_MINOR 20
#define VERSION_REV 428
#define VERSION_BUILD 1
#define VERSION_BUILD 2
#define SCINTILLA_VER 432
#define ONIGURUMA_REGEX_VER 6.9.5
#define UCHARDET_VER 2018.09.27
#define TINYEXPR_VER 2018.05.11
#define UTHASH_VER 2.1.0
#define VERSION_PATCH BETA
#define VERSION_COMMIT_ID dkt1-amr
#define VERSION_COMMIT_ID t7820-rk