[ENHANCE] Enhance the changed HSCRLL behaviour.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@134 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2008-02-20 01:25:51 +00:00
parent 0e32dd48f4
commit 608bc8187d
2 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -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;
}