GRAPHICS: MACGUI: Correctly expand selection beyond last line

This commit is contained in:
Eugene Sandulenko 2017-08-07 11:59:57 +02:00
parent abf6abdb65
commit d51a87a83b

View File

@ -448,6 +448,10 @@ void MacText::removeLastLine() {
}
void MacText::getRowCol(int x, int y, int *sx, int *sy, int *row, int *col) {
if (y > _textMaxHeight) {
x = _surface->w;
}
y = CLIP(y, 0, _textMaxHeight);
// FIXME: We should use bsearch() here
@ -456,9 +460,6 @@ void MacText::getRowCol(int x, int y, int *sx, int *sy, int *row, int *col) {
while (*row && _textLines[*row].y > y)
(*row)--;
if (y > _textMaxHeight)
x = _surface->w;
*sy = _textLines[*row].y;
*col = 0;