[commit] r2419 - trunk/GME/Search
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed Jan 22 11:15:22 CST 2014
Author: ksmyth
Date: Wed Jan 22 11:15:22 2014
New Revision: 2419
Log:
Fix autocomplete edit bug
Modified:
trunk/GME/Search/SearchDlg.cpp
Modified: trunk/GME/Search/SearchDlg.cpp
==============================================================================
--- trunk/GME/Search/SearchDlg.cpp Wed Jan 22 11:15:13 2014 (r2418)
+++ trunk/GME/Search/SearchDlg.cpp Wed Jan 22 11:15:22 2014 (r2419)
@@ -37,7 +37,8 @@
{
CString str;
GetWindowTextW(str);
- if (m_previous.GetLength() >= str.GetLength())
+ DWORD sel = GetEditSel();
+ if (m_previous.GetLength() >= str.GetLength() || wcsncmp(m_previous, str, m_previous.GetLength()) != 0)
{
m_previous = str;
return;
@@ -53,12 +54,12 @@
if (first != m_options.end())
{
SetWindowTextW(*first);
- SetEditSel(str.GetLength(), -1);
+ SetEditSel(sel, -1);
}
else
{
SetWindowTextW(str);
- SetEditSel(str.GetLength(), -1);
+ SetEditSel(sel, sel);
}
m_previous = str;
}
More information about the gme-commit
mailing list