adds zoom status to tab bar
This commit is contained in:
parent
192ae592bc
commit
63a0fc9af6
2 changed files with 16 additions and 5 deletions
|
|
@ -52,8 +52,21 @@ function M.move_pane(key, direction)
|
|||
}
|
||||
end
|
||||
|
||||
function M.get_zoom_state(active_pane)
|
||||
if active_pane.is_zoomed then
|
||||
function M.get_is_zoomed(for_window)
|
||||
local tab = for_window:active_tab()
|
||||
local panes_info = tab:panes_with_info()
|
||||
|
||||
for _, pane_info in ipairs(panes_info) do
|
||||
if pane_info.is_active then
|
||||
return pane_info.is_zoomed
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function M.get_zoomed_status(for_window)
|
||||
local is_zoomed = M.get_is_zoomed(for_window)
|
||||
|
||||
if is_zoomed then
|
||||
return "[Z]"
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue