aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2013-04-26 08:19:50 +1000
committernyamatongwe <devnull@localhost>2013-04-26 08:19:50 +1000
commite4f1a3ce3f091e2405333af2054c7b6e516605b3 (patch)
treef4ba6cc346410e1cf8cab0b225e7c6b9d01774da /src
parent88378fd3e470d6e99a2b0a46fbe145acb4bfb8dd (diff)
downloadscintilla-mirror-e4f1a3ce3f091e2405333af2054c7b6e516605b3.tar.gz
Bug: [#1467]. Don't change scroll position when window is zero size.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 8f023ee5f..9b98775c9 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1247,6 +1247,9 @@ Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange rang
const Point ptBottomCaret(pt.x, pt.y + vs.lineHeight - 1);
XYScrollPosition newXY(xOffset, topLine);
+ if (rcClient.Empty()) {
+ return newXY;
+ }
// Vertical positioning
if ((options & xysVertical) && (pt.y < rcClient.top || ptBottomCaret.y >= rcClient.bottom || (caretYPolicy & CARET_STRICT) != 0)) {