From 346dadcc7ba7cecc15fbbfa8fefc2d03b99388d4 Mon Sep 17 00:00:00 2001 From: graemeg Date: Mon, 17 Mar 2008 10:16:20 +0000 Subject: * Minor patch form Jean-Marc. Change avoids to check for an item in the list with an index value = -1 --- src/gui/gui_listbox.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/gui_listbox.pas b/src/gui/gui_listbox.pas index a1448803..d3164176 100644 --- a/src/gui/gui_listbox.pas +++ b/src/gui/gui_listbox.pas @@ -668,7 +668,7 @@ var begin // if user press a key then it will search the stringlist for a word // beginning with such as letter - if (Ord(AText[1]) > 31) and (Ord(AText[1]) < 127) or (Length(AText) > 1 ) then + if (Ord(AText[1]) > 31) and (Ord(AText[1]) < 127) and (FFocusItem > 0) or (Length(AText) > 1 ) then for i := FFocusItem to FItems.Count do begin if SameText(LeftStr(FItems.Strings[i-1], Length(AText)), AText) then -- cgit v1.2.3-70-g09d2