mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 13:54:54 +02:00
[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:
parent
0e32dd48f4
commit
608bc8187d
@ -6901,7 +6901,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||||||
}
|
}
|
||||||
|
|
||||||
case NPPM_ACTIVATEDOC :
|
case NPPM_ACTIVATEDOC :
|
||||||
// case NPPM_ACTIVATEDOCMENU:
|
case NPPM_TRIGGERTABBARCONTEXTMENU:
|
||||||
{
|
{
|
||||||
// similar to NPPM_ACTIVEDOC
|
// similar to NPPM_ACTIVEDOC
|
||||||
int whichView = ((wParam != MAIN_VIEW) && (wParam != SUB_VIEW))?getCurrentView():wParam;
|
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);
|
switchEditViewTo(whichView);
|
||||||
activateDoc(index);
|
activateDoc(index);
|
||||||
|
|
||||||
//if (Message == NPPM_ACTIVATEDOCMENU)
|
if (Message == NPPM_TRIGGERTABBARCONTEXTMENU)
|
||||||
{
|
{
|
||||||
// open here tab menu
|
// open here tab menu
|
||||||
NMHDR nmhdr;
|
NMHDR nmhdr;
|
||||||
|
@ -926,6 +926,9 @@ char * ScintillaEditView::activateDocAt(int index)
|
|||||||
{
|
{
|
||||||
::SendMessage(_hParent, NPPM_INTERNAL_DOCSWITCHOFF, 0, (LPARAM)_hSelf);
|
::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
|
// before activating another document, we get the current position
|
||||||
// from the Scintilla view then save it to the current document
|
// from the Scintilla view then save it to the current document
|
||||||
saveCurrentPos();
|
saveCurrentPos();
|
||||||
@ -988,6 +991,7 @@ char * ScintillaEditView::activateDocAt(int index)
|
|||||||
::SendMessage(_hParent, NPPM_INTERNAL_DOCSWITCHIN, 0, (LPARAM)_hSelf);
|
::SendMessage(_hParent, NPPM_INTERNAL_DOCSWITCHIN, 0, (LPARAM)_hSelf);
|
||||||
|
|
||||||
//recalcHorizontalScrollbar(); //Update scrollbar after switching file
|
//recalcHorizontalScrollbar(); //Update scrollbar after switching file
|
||||||
|
//execute(SCI_SETSCROLLWIDTHTRACKING, false);
|
||||||
|
|
||||||
return _buffers[_currentIndex]._fullPathName;
|
return _buffers[_currentIndex]._fullPathName;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user