Fix search for item by text in wxMSW wxListCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 Mar 2011 09:28:41 +0000 (09:28 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 Mar 2011 09:28:41 +0000 (09:28 +0000)
commitba7bc4e4e6080988d8e034bcae20de0fe936d187
tree3590bfa676b2eaab48678959b8503e1087c1a3ae
parentaab1681669d895adc4dd110e902ea1a71387bb6f
Fix search for item by text in wxMSW wxListCtrl.

LVN_ODFINDITEM handler could enter infinite loop if its selection was 0 and a
key not matching any of the items first letters was pressed.

Rewrite the loop in a simpler form to ensure that it is correct. Also clarify
some comments. Finally, fix the behaviour when no matching item was found (if
it didn't hang in infinite loop, it used to select the first item in the
control).

Closes #13026.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/msw/listctrl.cpp