From 7896e9572fe538f3115bcf54e6b0eb229e709c44 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 7 Aug 2017 12:02:57 +0200 Subject: GRAPHICS: MACGUI: Correctly process revere oneliner selections --- graphics/macgui/mactextwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graphics/macgui/mactextwindow.cpp') diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp index 2f0e95f15d..944eebdcc3 100644 --- a/graphics/macgui/mactextwindow.cpp +++ b/graphics/macgui/mactextwindow.cpp @@ -160,7 +160,7 @@ void MacTextWindow::drawSelection() { SelectedText s = _selectedText; - if (s.startY > s.endY) { + if (s.startY > s.endY || (s.startY == s.endY && s.startX > s.endX)) { SWAP(s.startX, s.endX); SWAP(s.startY, s.endY); SWAP(s.startRow, s.endRow); @@ -219,7 +219,7 @@ Common::String MacTextWindow::getSelection(bool formatted) { SelectedText s = _selectedText; - if (s.startY > s.endY) { + if (s.startY > s.endY || (s.startY == s.endY && s.startX > s.endX)) { SWAP(s.startRow, s.endRow); SWAP(s.startCol, s.endCol); } -- cgit v1.2.3