diff options
author | Derek <unknown> | 2021-10-16 06:39:09 -0400 |
---|---|---|
committer | Derek <unknown> | 2021-10-16 06:39:09 -0400 |
commit | f61c799e7333538b3001d56977dc71de97ffedf3 (patch) | |
tree | 44d2d714274bfaefbd5a0f3ea5c8b39d01cdbf68 | |
parent | 68a215e9b99aae7a03b2fc1a55bdfb731a40ec47 (diff) | |
download | scintilla-mirror-f61c799e7333538b3001d56977dc71de97ffedf3.tar.gz |
Bug [#2288] When window wider than scroll width, compute horizEndPreferred
correctly so that SetScrollInfo is not called nor dwell end notified
unnecessarily.
-rw-r--r-- | doc/ScintillaHistory.html | 7 | ||||
-rw-r--r-- | win32/ScintillaWin.cxx | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index e78ef1070..196a7710d 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -564,6 +564,7 @@ </tr><tr> <td>Michael Neuroth</td> <td>Arne Scheffler</td> + <td>Derek</td> </tr> </table> <h2>Releases</h2> @@ -580,6 +581,12 @@ <li> On GTK, fix potential crash when closing Scintilla instances due to releasing global settings object. </li> + <li> + On Win32, when window is wider than scroll width, + use correct values when checking whether to change horizontal scroll bar so + only update and notify dwell end when needed. + <a href="https://sourceforge.net/p/scintilla/bugs/2288/">Bug #2288</a>. + </li> </ul> <h3> <a href="https://www.scintilla.org/scintilla513.zip">Release 5.1.3</a> diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index a45c7a076..4fd86ec7c 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -2340,10 +2340,10 @@ bool ScintillaWin::ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) { } const PRectangle rcText = GetTextRectangle(); - int horizEndPreferred = scrollWidth; + int pageWidth = static_cast<int>(rcText.Width()); + int horizEndPreferred = std::max(scrollWidth, pageWidth-1); if (horizEndPreferred < 0) horizEndPreferred = 0; - int pageWidth = static_cast<int>(rcText.Width()); if (!horizontalScrollBarVisible || Wrapping()) pageWidth = horizEndPreferred + 1; sci.fMask = SIF_PAGE | SIF_RANGE; |