diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index cef50a69..679bc06f 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -6901,7 +6901,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa } case NPPM_ACTIVATEDOC : -// case NPPM_ACTIVATEDOCMENU: + case NPPM_TRIGGERTABBARCONTEXTMENU: { // similar to NPPM_ACTIVEDOC int whichView = ((wParam != MAIN_VIEW) && (wParam != SUB_VIEW))?getCurrentView():wParam; @@ -6910,7 +6910,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa switchEditViewTo(whichView); activateDoc(index); - //if (Message == NPPM_ACTIVATEDOCMENU) + if (Message == NPPM_TRIGGERTABBARCONTEXTMENU) { // open here tab menu NMHDR nmhdr; diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index a7367fb4..f09cc205 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -925,6 +925,9 @@ void ScintillaEditView::restoreFromWrap() char * ScintillaEditView::activateDocAt(int index) { ::SendMessage(_hParent, NPPM_INTERNAL_DOCSWITCHOFF, 0, (LPARAM)_hSelf); + + // To minimize the scroll width on each doc switch + execute(SCI_SETSCROLLWIDTH, 1); // before activating another document, we get the current position // from the Scintilla view then save it to the current document @@ -988,6 +991,7 @@ char * ScintillaEditView::activateDocAt(int index) ::SendMessage(_hParent, NPPM_INTERNAL_DOCSWITCHIN, 0, (LPARAM)_hSelf); //recalcHorizontalScrollbar(); //Update scrollbar after switching file +//execute(SCI_SETSCROLLWIDTHTRACKING, false); return _buffers[_currentIndex]._fullPathName; }