From 66f59aa893449596298a2cee1d8f761bcf8cc9bd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 3 Aug 2017 20:02:13 +0200 Subject: GRAPHICS: MACGUI: Correctly display selection during scrolling --- graphics/macgui/mactextwindow.cpp | 6 +++--- 1 file 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; } -- cgit v1.2.3