Changeset - r27907:1d59f0f346da
[Not reviewed]
master
0 1 0
Loïc Guilloux - 12 months ago 2023-09-13 16:07:55
glx22@users.noreply.github.com
Fix: IConsoleWindow:GetTextBoundingRect() is incorrect (#11292)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/console_gui.cpp
Show inline comments
 
@@ -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;
0 comments (0 inline, 0 general)