Make the treeview correctly search when the top index is selected.

This commit is contained in:
Jason Edmeades 2005-03-23 11:58:58 +00:00 committed by Alexandre Julliard
parent 38a03ca6c8
commit 06c7c90a69
1 changed files with 8 additions and 0 deletions

View File

@ -4388,10 +4388,18 @@ static INT TREEVIEW_ProcessLetterKeys(
idx=infoPtr->root->firstChild;
}
do {
/* At the end point, sort out wrapping */
if (idx == NULL) {
/* If endidx is null, stop at the last item (ie top to bottom) */
if (endidx == NULL)
break;
/* Otherwise, start again at the very beginning */
idx=infoPtr->root->firstChild;
/* But if we are stopping on the first child, end now! */
if (idx == endidx) break;
}
/* get item */