[PATCH] wineconsole: Fix "Select all" functionality in USER backend.

Dmitry Timoshkov dmitry at baikal.ru
Wed Nov 13 21:46:25 CST 2019


Selection is stored in character cell coords, not in pixels.
"Mark" functionality behaves correctly.

In order to reproduce the bug run wineconsole, press right mouse button,
choose Edit -> Select all, then Edit -> Copy, and paste the result into
text editor (under Wine or native).

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 programs/wineconsole/user.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c
index 28e81261e9..5cc405d5b7 100644
--- a/programs/wineconsole/user.c
+++ b/programs/wineconsole/user.c
@@ -1310,8 +1310,8 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
 	    break;
 	case IDS_SELECTALL:
             PRIVATE(data)->selectPt1.X = PRIVATE(data)->selectPt1.Y = 0;
-            PRIVATE(data)->selectPt2.X = (data->curcfg.sb_width - 1) * data->curcfg.cell_width;
-            PRIVATE(data)->selectPt2.Y = (data->curcfg.sb_height - 1) * data->curcfg.cell_height;
+            PRIVATE(data)->selectPt2.X = data->curcfg.sb_width - 1;
+            PRIVATE(data)->selectPt2.Y = data->curcfg.sb_height - 1;
             WCUSER_SetSelection(data, 0);
             PRIVATE(data)->has_selection = TRUE;
 	    break;
-- 
2.20.1




More information about the wine-devel mailing list