aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui/mactextwindow.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-03 20:02:13 +0200
committerEugene Sandulenko2017-08-04 21:54:20 +0200
commit66f59aa893449596298a2cee1d8f761bcf8cc9bd (patch)
treedaed6b03846dd77afe22f8e5ca4ce266004c9e65 /graphics/macgui/mactextwindow.cpp
parentafb664df290c54febd48b25efe6eeb5fccc0cfcc (diff)
downloadscummvm-rg350-66f59aa893449596298a2cee1d8f761bcf8cc9bd.tar.gz
scummvm-rg350-66f59aa893449596298a2cee1d8f761bcf8cc9bd.tar.bz2
scummvm-rg350-66f59aa893449596298a2cee1d8f761bcf8cc9bd.zip
GRAPHICS: MACGUI: Correctly display selection during scrolling
Diffstat (limited to 'graphics/macgui/mactextwindow.cpp')
-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;
}