summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-17 10:16:20 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-17 10:16:20 +0000
commit346dadcc7ba7cecc15fbbfa8fefc2d03b99388d4 (patch)
tree185927714d63a9253e6d6abd295727018180a204
parentb12156cca742629dd993601f324063ab5975379b (diff)
downloadfpGUI-346dadcc7ba7cecc15fbbfa8fefc2d03b99388d4.tar.xz
* Minor patch form Jean-Marc. Change avoids to check for an item in the list with an index value = -1
-rw-r--r--src/gui/gui_listbox.pas2
1 files changed, 1 insertions, 1 deletions
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