From bae3eb5bda6b5eeea40797f82ffa9d239c6fd0d6 Mon Sep 17 00:00:00 2001 From: donho Date: Thu, 19 Jun 2008 23:55:18 +0000 Subject: [PATCH] [BUG_FIXED] Fix the User Language Define Dialog don't update current document. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@244 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 4 ++-- PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index be6951b4b..021d7235b 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -264,13 +264,13 @@ void Notepad_plus::init(HINSTANCE hInst, HWND parent, const char *cmdLine, CmdLi ::SendMessage(_hSelf, NPPM_HIDETABBAR, 0, TRUE); } - ::ShowWindow(_hSelf, nppGUI._isMaximized?SW_MAXIMIZE:SW_SHOW); - if (nppGUI._rememberLastSession && !cmdLineParams->_isNoSession) { loadLastSession(); } + ::ShowWindow(_hSelf, nppGUI._isMaximized?SW_MAXIMIZE:SW_SHOW); + if (cmdLine) { loadCommandlineParams(cmdLine, cmdLineParams); diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index f0515534c..fdc3c677f 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -1011,6 +1011,7 @@ void ScintillaEditView::restyleBuffer() { void ScintillaEditView::styleChange() { defineDocType(_currentBuffer->getLangType()); + restyleBuffer(); } void ScintillaEditView::activateBuffer(BufferID buffer)