From 9dbd84f15e41fcda9d930995e12da8b33f5851c7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 16 Sep 2019 16:00:39 +0300 Subject: missing tab auto complete code handler restored --- plugins/TabSRMM/src/msgdialog.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'plugins/TabSRMM/src/msgdialog.cpp') diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 1d368665be..8f3daf9d19 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2149,6 +2149,21 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) if (wParam == VK_CAPITAL || wParam == VK_NUMLOCK) m_message.OnChange(&m_message); + // tab-autocomplete + if (isChat() && wParam == VK_TAB && !isCtrl && !isShift) { + m_message.SendMsg(WM_SETREDRAW, FALSE, 0); + bool fCompleted = TabAutoComplete(); + m_message.SendMsg(WM_SETREDRAW, TRUE, 0); + RedrawWindow(m_message.GetHwnd(), nullptr, nullptr, RDW_INVALIDATE); + if (!fCompleted && !PluginConfig.m_bAllowTab) { + if ((GetSendButtonState(GetHwnd()) != PBS_DISABLED)) + SetFocus(m_btnOk.GetHwnd()); + else + SetFocus(m_log.GetHwnd()); + } + return 0; + } + if (wParam != VK_RIGHT && wParam != VK_LEFT) { replaceStrW(m_wszSearchQuery, nullptr); replaceStrW(m_wszSearchResult, nullptr); -- cgit v1.2.3