From 31f6bf83983209d596db5f037ad9e9628817f2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20J=C3=B6nsson?= Date: Sat, 25 Apr 2015 13:11:35 +0200 Subject: [PATCH] When hiding tab bar via command-line parameter, don't affect settings. --- PowerEditor/src/Notepad_plus_Window.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PowerEditor/src/Notepad_plus_Window.cpp b/PowerEditor/src/Notepad_plus_Window.cpp index b089b60ea..4dc4ad1a3 100644 --- a/PowerEditor/src/Notepad_plus_Window.cpp +++ b/PowerEditor/src/Notepad_plus_Window.cpp @@ -124,7 +124,13 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const TCHAR *cmdLin if (cmdLineParams->_isNoTab || (nppGUI._tabStatus & TAB_HIDE)) { + const int tabStatusOld = nppGUI._tabStatus; ::SendMessage(_hSelf, NPPM_HIDETABBAR, 0, TRUE); + if (cmdLineParams->_isNoTab) + { + // Restore old settings when tab bar has been hidden from tab bar. + nppGUI._tabStatus = tabStatusOld; + } } if (cmdLineParams->_alwaysOnTop)