mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 17:39:23 +02:00
Cody/Dictionary: Respect modifier keys and stop passing keystroke processing
This commit is contained in:
parent
0103e0a803
commit
caebf3502a
@ -937,18 +937,23 @@ procedure TCodyIdentifiersDlg.FilterEditKeyDown(Sender: TObject; var Key: Word;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
i:=ItemsListBox.ItemIndex;
|
||||
case Key of
|
||||
VK_DOWN:
|
||||
if (Key = VK_DOWN) and (Shift = []) then
|
||||
begin
|
||||
i:=ItemsListBox.ItemIndex;
|
||||
if i<0 then
|
||||
ItemsListBox.ItemIndex:=Min(ItemsListBox.Items.Count-1,0)
|
||||
else if i<ItemsListBox.Count-1 then
|
||||
ItemsListBox.ItemIndex:=i+1;
|
||||
VK_UP:
|
||||
Key := 0;
|
||||
end
|
||||
else if (Key = VK_UP) and (Shift = []) then
|
||||
begin
|
||||
i:=ItemsListBox.ItemIndex;
|
||||
if i<0 then
|
||||
ItemsListBox.ItemIndex:=ItemsListBox.Count-1
|
||||
else if i>0 then
|
||||
ItemsListBox.ItemIndex:=i-1;
|
||||
Key := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user