From 638af7c6f8582c24c23b247e068961dba57d9af7 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 8 Oct 2010 23:02:57 +1100 Subject: Fix for bug #3081721. Scroll to make caret visible off-by-one error. --- src/Editor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 84907b01d..d180e6194 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1084,7 +1084,7 @@ Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const bool useMargin, con XYScrollPosition newXY(xOffset, topLine); // Vertical positioning - if (vert && (pt.y < rcClient.top || ptBottomCaret.y > rcClient.bottom || (caretYPolicy & CARET_STRICT) != 0)) { + if (vert && (pt.y < rcClient.top || ptBottomCaret.y >= rcClient.bottom || (caretYPolicy & CARET_STRICT) != 0)) { const int linesOnScreen = LinesOnScreen(); const int halfScreen = Platform::Maximum(linesOnScreen - 1, 2) / 2; const bool bSlop = (caretYPolicy & CARET_SLOP) != 0; -- cgit v1.2.3