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 /win32/ScintillaWin.cxx | |
| 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.
Diffstat (limited to 'win32/ScintillaWin.cxx')
| -rw-r--r-- | win32/ScintillaWin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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; |
