From 924742e901072eeb552a51e5dab916d9fa245e67 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 10 Feb 2012 20:52:02 +1100 Subject: Bug #3484416. Modify how scroll bars are hidden in order not to interfere with dwelling. From Marko Njezic. --- win32/ScintillaWin.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 92dd32ffc..e7236024e 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1348,13 +1348,11 @@ bool ScintillaWin::ModifyScrollBars(int nMax, int nPage) { GetScrollInfo(SB_VERT, &sci); int vertEndPreferred = nMax; if (!verticalScrollBarVisible) - vertEndPreferred = 0; + nPage = vertEndPreferred + 1; if ((sci.nMin != 0) || (sci.nMax != vertEndPreferred) || (sci.nPage != static_cast(nPage)) || (sci.nPos != 0)) { - //Platform::DebugPrintf("Scroll info changed %d %d %d %d %d\n", - // sci.nMin, sci.nMax, sci.nPage, sci.nPos, sci.nTrackPos); sci.fMask = SIF_PAGE | SIF_RANGE; sci.nMin = 0; sci.nMax = vertEndPreferred; @@ -1369,9 +1367,9 @@ bool ScintillaWin::ModifyScrollBars(int nMax, int nPage) { int horizEndPreferred = scrollWidth; if (horizEndPreferred < 0) horizEndPreferred = 0; - if (!horizontalScrollBarVisible || (wrapState != eWrapNone)) - horizEndPreferred = 0; unsigned int pageWidth = rcText.Width(); + if (!horizontalScrollBarVisible || (wrapState != eWrapNone)) + pageWidth = horizEndPreferred + 1; sci.fMask = SIF_PAGE | SIF_RANGE; GetScrollInfo(SB_HORZ, &sci); if ((sci.nMin != 0) || -- cgit v1.2.3