summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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