Fix: IConsoleWindow:GetTextBoundingRect() is incorrect (#11292)

(cherry picked from commit 220f93f552)
pull/603/head
Loïc Guilloux 9 months ago committed by Jonathan G Rennison
parent 6be4708131
commit 4c4fe8cf64

@ -320,7 +320,7 @@ struct IConsoleWindow : Window
int delta = std::min<int>(this->width - this->line_offset - _iconsole_cmdline.pixels - ICON_RIGHT_BORDERWIDTH, 0);
Point p1 = GetCharPosInString(_iconsole_cmdline.buf, from, FS_NORMAL);
Point p2 = from != to ? GetCharPosInString(_iconsole_cmdline.buf, from) : p1;
Point p2 = from != to ? GetCharPosInString(_iconsole_cmdline.buf, to, FS_NORMAL) : p1;
Rect r = {this->line_offset + delta + p1.x, this->height - this->line_height, this->line_offset + delta + p2.x, this->height};
return r;

Loading…
Cancel
Save