From 3d2b42332884fec35a7e79e919bd31fd4f6816a3 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 21 Dec 2020 18:38:22 +0100 Subject: [PATCH] conhost: Fix copy-paste typos in selection coordinates. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50052 Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- programs/conhost/window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/conhost/window.c b/programs/conhost/window.c index ed806c379d3..55690377a7e 100644 --- a/programs/conhost/window.c +++ b/programs/conhost/window.c @@ -878,7 +878,7 @@ static COORD get_cell( struct console *console, LPARAM lparam ) { COORD c; c.X = console->active->win.left + (short)LOWORD(lparam) / console->active->font.width; - c.Y = console->active->win.left + (short)HIWORD(lparam) / console->active->font.height; + c.Y = console->active->win.top + (short)HIWORD(lparam) / console->active->font.height; return c; } @@ -906,11 +906,11 @@ static void get_selection_rect( struct console *console, RECT *r ) r->left = (min(console->window->selection_start.X, console->window->selection_end.X) - console->active->win.left) * console->active->font.width; r->top = (min(console->window->selection_start.Y, console->window->selection_end.Y) - - console->active->win.left) * console->active->font.height; + console->active->win.top) * console->active->font.height; r->right = (max(console->window->selection_start.X, console->window->selection_end.X) + 1 - console->active->win.left) * console->active->font.width; r->bottom = (max(console->window->selection_start.Y, console->window->selection_end.Y) + 1 - - console->active->win.left) * console->active->font.height; + console->active->win.top) * console->active->font.height; } static void update_selection( struct console *console, HDC ref_dc )