mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
lexers with empty "associated filename ext" will be intialized with default extentions
This commit is contained in:
parent
b664857966
commit
5b903182c7
@ -1 +1 @@
|
||||
2519
|
||||
2520
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<assemblyIdentity
|
||||
name="Notepad3"
|
||||
processorArchitecture="*"
|
||||
version="5.19.730.2519"
|
||||
version="5.19.730.2520"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Notepad3 RC2</description>
|
||||
|
||||
@ -611,6 +611,11 @@ bool Style_ImportFromFile(const WCHAR* szFile)
|
||||
IniSectionGetString(Lexer_Section, L"FileNameExtensions", g_pLexArray[iLexer]->pszDefExt,
|
||||
g_pLexArray[iLexer]->szExtensions, COUNTOF(g_pLexArray[iLexer]->szExtensions));
|
||||
|
||||
// don't allow empty extensions settings => use default ext
|
||||
if (StrIsEmpty(g_pLexArray[iLexer]->szExtensions)) {
|
||||
StringCchCopy(g_pLexArray[iLexer]->szExtensions, COUNTOF(g_pLexArray[iLexer]->szExtensions), g_pLexArray[iLexer]->pszDefExt);
|
||||
}
|
||||
|
||||
unsigned i = 0;
|
||||
while (g_pLexArray[iLexer]->Styles[i].iStyle != -1)
|
||||
{
|
||||
@ -627,13 +632,13 @@ bool Style_ImportFromFile(const WCHAR* szFile)
|
||||
if (StringCchCompareXI(L"Text Files", g_pLexArray[iLexer]->pszName) == 0)
|
||||
{
|
||||
if (StrIsNotEmpty(g_pLexArray[0]->szExtensions)) {
|
||||
StringCchCopyW(g_pLexArray[iLexer]->szExtensions, COUNTOF(g_pLexArray[iLexer]->szExtensions), g_pLexArray[0]->szExtensions);
|
||||
StringCchCopy(g_pLexArray[iLexer]->szExtensions, COUNTOF(g_pLexArray[iLexer]->szExtensions), g_pLexArray[0]->szExtensions);
|
||||
StrTrim(g_pLexArray[iLexer]->szExtensions, L"; ");
|
||||
}
|
||||
lexStandard.szExtensions[0] = L'\0';
|
||||
lexStandard2nd.szExtensions[0] = L'\0';
|
||||
// copy default style
|
||||
StringCchCopyW(g_pLexArray[iLexer]->Styles[0].szValue, COUNTOF(g_pLexArray[iLexer]->Styles[0].szValue), g_pLexArray[0]->Styles[0].szValue);
|
||||
StringCchCopy(g_pLexArray[iLexer]->Styles[0].szValue, COUNTOF(g_pLexArray[iLexer]->Styles[0].szValue), g_pLexArray[0]->Styles[0].szValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#define VERSION_MAJOR 5
|
||||
#define VERSION_MINOR 19
|
||||
#define VERSION_REV 730
|
||||
#define VERSION_BUILD 2519
|
||||
#define VERSION_BUILD 2520
|
||||
#define SCINTILLA_VER 420
|
||||
#define ONIGURUMA_REGEX_VER 6.9.3
|
||||
#define VERSION_PATCH RC2
|
||||
|
||||
Loading…
Reference in New Issue
Block a user