Skip to content

Commit

Permalink
fix(collapsed): make window visible for focus action (#98)
Browse files Browse the repository at this point in the history
## Description

Make window visible if hidden because of collapsed option is set before
`focus` action.
This is expected behavior for `focus` action.

## Fixes
This makes `focus` action behavior to be consistent across collapsed and
non collapsed windows.

## Related Issue(s)
None

## Screenshots
  • Loading branch information
gj86 authored Jul 7, 2024
1 parent 3a88691 commit e26aedb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/edgy/window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ function M:sibling(dir, opts)
end

function M:focus()
if not self.visible then
self:show(true)
end
vim.api.nvim_set_current_win(self.win)
end

Expand Down

0 comments on commit e26aedb

Please sign in to comment.