From 51bab6ee87839b792533d6587602266f2faacf10 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 13 Dec 2017 13:12:23 +0300 Subject: fix for Ctrl+A for #1062 --- src/mir_app/src/srmm_base.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index 2d3c5ea8dc..f74de86add 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -185,9 +185,12 @@ LRESULT CSrmmBaseDialog::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) break; case WM_CHAR: - SetFocus(m_message.GetHwnd()); - if (wParam != '\t') + if (wParam >= ' ') { + SetFocus(m_message.GetHwnd()); m_message.SendMsg(WM_CHAR, wParam, lParam); + } + else if (wParam == '\t') + SetFocus(m_message.GetHwnd()); break; case WM_CONTEXTMENU: @@ -195,9 +198,9 @@ LRESULT CSrmmBaseDialog::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) break; POINT pt, ptl; - m_message.SendMsg(EM_EXGETSEL, 0, (LPARAM)&sel); + m_log.SendMsg(EM_EXGETSEL, 0, (LPARAM)&sel); if (lParam == 0xFFFFFFFF) { - m_message.SendMsg(EM_POSFROMCHAR, (WPARAM)&pt, (LPARAM)sel.cpMax); + m_log.SendMsg(EM_POSFROMCHAR, (WPARAM)&pt, (LPARAM)sel.cpMax); ClientToScreen(m_log.GetHwnd(), &pt); } else { -- cgit v1.2.3