mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-22 05:14:41 +02:00
Fix wrong horizontal scroll bar position after restoring Window position
Fix #8466, close #8475
This commit is contained in:
parent
53b03cc5c5
commit
267da64d33
@ -1646,6 +1646,10 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||||||
case WM_ACTIVATE:
|
case WM_ACTIVATE:
|
||||||
{
|
{
|
||||||
_pEditView->getFocus();
|
_pEditView->getFocus();
|
||||||
|
auto x = _pEditView->execute(SCI_GETXOFFSET);
|
||||||
|
_pEditView->execute(SCI_SETXOFFSET, x);
|
||||||
|
x = _pNonEditView->execute(SCI_GETXOFFSET);
|
||||||
|
_pNonEditView->execute(SCI_SETXOFFSET, x);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,13 +221,14 @@ public:
|
|||||||
{
|
{
|
||||||
::DestroyWindow(_hSelf);
|
::DestroyWindow(_hSelf);
|
||||||
_hSelf = NULL;
|
_hSelf = NULL;
|
||||||
|
_pScintillaFunc = NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void init(HINSTANCE hInst, HWND hPere);
|
virtual void init(HINSTANCE hInst, HWND hPere);
|
||||||
|
|
||||||
LRESULT execute(UINT Msg, WPARAM wParam=0, LPARAM lParam=0) const {
|
LRESULT execute(UINT Msg, WPARAM wParam=0, LPARAM lParam=0) const {
|
||||||
try {
|
try {
|
||||||
return _pScintillaFunc(_pScintillaPtr, Msg, wParam, lParam);
|
return (_pScintillaFunc) ? _pScintillaFunc(_pScintillaPtr, Msg, wParam, lParam) : -1;
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user