1
0
Fork 0

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

pull/11294/head
Loïc Guilloux 2023-09-13 18:07:55 +02:00 committed by GitHub
parent 71c2878799
commit 220f93f552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -298,7 +298,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;