diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-16 16:00:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-16 16:00:39 +0300 |
commit | 9dbd84f15e41fcda9d930995e12da8b33f5851c7 (patch) | |
tree | 63c56a1cdcad452cfa8c5e5e92c64b9bc2ad0e43 /plugins/TabSRMM/src | |
parent | 8f23785d669b571df8e6df4ae17cd1aca684b9b6 (diff) |
missing tab auto complete code handler restored
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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);
|