+ fix: set standard lexer (Default Text) on new (empty) files

This commit is contained in:
Rainer Kottenhoff 2017-12-23 10:51:36 +01:00
parent 4b3a3fb866
commit ffb2e95f5c
2 changed files with 5 additions and 7 deletions

View File

@ -1159,11 +1159,9 @@ LRESULT CALLBACK MainWndProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam)
// update Scintilla colors
case WM_SYSCOLORCHANGE:
{
Style_SetLexer(g_hwndEdit,NULL); // uses current lexer
UpdateLineNumberWidth();
return DefWindowProc(hwnd,umsg,wParam,lParam);
}
SendMessage(g_hwndEdit, SCI_COLOURISE, 0, (LPARAM)-1);
UpdateLineNumberWidth();
return DefWindowProc(hwnd,umsg,wParam,lParam);
//case WM_TIMER:
// return DefWindowProc(hwnd,umsg,wParam,lParam);

View File

@ -3129,9 +3129,9 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) {
WCHAR wchFontName[64] = { '\0' };
WCHAR wchCaretStyle[64] = { L'\0' };
// Select current if NULL is specified
// Select standard if NULL is specified
if (!pLexNew) {
pLexNew = g_pLexCurrent; // initially current lexer is default lexer
pLexNew = &lexStandard;
}
// Lexer