Skip to content

Commit

Permalink
fix: make FocusInDirectionCommand a no-op if focused container is m…
Browse files Browse the repository at this point in the history
…aximized (#471)

Co-authored-by: Wis <[email protected]>
  • Loading branch information
Wis and wis authored Dec 18, 2023
1 parent b033f22 commit 8ff0de5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public CommandResponse Handle(FocusInDirectionCommand command)
var direction = command.Direction;
var focusedContainer = _containerService.FocusedContainer;

if (focusedContainer is MaximizedWindow)
return CommandResponse.Ok;

var focusTarget = GetFocusTarget(focusedContainer, direction);

if (focusTarget is null || focusTarget == focusedContainer)
Expand Down

0 comments on commit 8ff0de5

Please sign in to comment.