From fb817e4c71225e1af17c27b7970a641d3aef7e1f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 7 Sep 2002 19:01:32 +0000 Subject: [PATCH] Fix off-by-one in vertical scrolling git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/stc/ScintillaWX.cpp | 4 ++-- src/stc/ScintillaWX.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index 506d56ffc2..f1c0e43a0a 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -269,7 +269,7 @@ bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) { int sbThumb = stc->GetScrollThumb(wxVERTICAL); int sbPos = stc->GetScrollPos(wxVERTICAL); if (sbMax != nMax || sbThumb != nPage) { - stc->SetScrollbar(wxVERTICAL, sbPos, nPage, nMax); + stc->SetScrollbar(wxVERTICAL, sbPos, nPage, nMax+1); modified = true; } } @@ -278,7 +278,7 @@ bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) { int sbPage = stc->m_vScrollBar->GetPageSize(); int sbPos = stc->m_vScrollBar->GetThumbPosition(); if (sbMax != nMax || sbPage != nPage) { - stc->m_vScrollBar->SetScrollbar(sbPos, nPage, nMax, nPage); + stc->m_vScrollBar->SetScrollbar(sbPos, nPage, nMax+1, nPage); modified = true; } } diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 506d56ffc2..f1c0e43a0a 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -269,7 +269,7 @@ bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) { int sbThumb = stc->GetScrollThumb(wxVERTICAL); int sbPos = stc->GetScrollPos(wxVERTICAL); if (sbMax != nMax || sbThumb != nPage) { - stc->SetScrollbar(wxVERTICAL, sbPos, nPage, nMax); + stc->SetScrollbar(wxVERTICAL, sbPos, nPage, nMax+1); modified = true; } } @@ -278,7 +278,7 @@ bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) { int sbPage = stc->m_vScrollBar->GetPageSize(); int sbPos = stc->m_vScrollBar->GetThumbPosition(); if (sbMax != nMax || sbPage != nPage) { - stc->m_vScrollBar->SetScrollbar(sbPos, nPage, nMax, nPage); + stc->m_vScrollBar->SetScrollbar(sbPos, nPage, nMax+1, nPage); modified = true; } } -- 2.45.2