aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2013-04-26 08:19:50 +1000
committernyamatongwe <unknown>2013-04-26 08:19:50 +1000
commit4975a96098da2e4f1656b228d89281e80fc67dea (patch)
treedcf4e384a0cf38af41bcd6cc7f828df252d2d22c /src/Editor.cxx
parent427e0106567b3e6063fd5a305ec0270f18a34fd7 (diff)
downloadscintilla-mirror-4975a96098da2e4f1656b228d89281e80fc67dea.tar.gz
Bug: [#1467]. Don't change scroll position when window is zero size.
Diffstat (limited to 'src/Editor.cxx')
-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)) {