diff options
author | George Hazan <ghazan@miranda.im> | 2019-11-08 22:17:29 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-11-08 22:17:29 +0300 |
commit | 14ab56b09fdb06bc0d93028799066ecaa942ca09 (patch) | |
tree | 3d70a0e68de85e17cebd0b1ae61e0c6d6b531b4a /plugins/TabSRMM/src | |
parent | 053eae7ce2b585aebed1edd13ff7a039032da1f0 (diff) |
tabSRMM: tab autocomplete shall restore original cursor position if nothing is found
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/msgdlgother.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index 05517ae407..72fcc8ca6a 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -1706,6 +1706,7 @@ bool CMsgDialog::TabAutoComplete() { LRESULT lResult = m_message.SendMsg(EM_GETSEL, 0, 0); int start = LOWORD(lResult), end = HIWORD(lResult); + int origStart = start, origEnd = end; m_message.SendMsg(EM_SETSEL, end, end); GETTEXTEX gt = { 0 }; @@ -1786,6 +1787,7 @@ LBL_SkipEnd: m_message.SendMsg(EM_SETSEL, start, end); m_message.SendMsg(EM_REPLACESEL, TRUE, (LPARAM)m_wszSearchQuery); } + m_message.SendMsg(EM_SETSEL, origStart, origEnd); replaceStrW(m_wszSearchQuery, nullptr); return false; } |