Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ollydev committed Dec 12, 2023
1 parent fdfb97c commit 2c5cdef
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Source/forms/simba.main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,27 @@ procedure TSimbaForm.DoApplicationKeyDown(Sender: TObject; var Key: Word; Shift:
Result := (Screen.ActiveControl is TSimbaEditor) and (TSimbaEditor(Screen.ActiveControl).Keystrokes.FindKeycode(Key, Shift) > -1);
end;

function isScriptTabFormParent(Control: TControl): Boolean;
begin
while (Control <> nil) do
begin
if (Control.Parent = SimbaScriptTabsForm) then
begin
Result := True;
Exit;
end;
Control := Control.Parent;
end;
Result := False;
end;

var
Msg: TLMKey;
begin
if isEditorKeyStroke() then
Exit;

if (Screen.ActiveControl is TSimbaEditor) or (Screen.ActiveControl is TSimbaMenuBar) then
if isScriptTabFormParent(Screen.ActiveControl) or (Screen.ActiveControl is TSimbaMenuBar) then
begin
Msg := Default(TLMKey);
Msg.CharCode := Key;
Expand Down

0 comments on commit 2c5cdef

Please sign in to comment.