aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/macgui/mactextwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp
index ce84a5b8f0..9d1de2f129 100644
--- a/graphics/macgui/mactextwindow.cpp
+++ b/graphics/macgui/mactextwindow.cpp
@@ -166,8 +166,8 @@ void MacTextWindow::drawSelection() {
SWAP(s.startCol, s.endCol);
}
- int lastLineHeight = _mactext->getLineHeight(s.endRow);
- s.endY += lastLineHeight;
+ int lastLineStart = s.endY;
+ s.endY += _mactext->getLineHeight(s.endRow);
int start = s.startY - _scrollPos;
start = MAX(0, start);
@@ -194,7 +194,7 @@ void MacTextWindow::drawSelection() {
numLines = _mactext->getLineHeight(s.startRow);
x1 = s.startX;
}
- if (y + _scrollPos == s.endY - lastLineHeight) {
+ if (y + _scrollPos == lastLineStart) {
numLines = _mactext->getLineHeight(s.endRow);
x2 = s.endX;
}