Skip to content

How to get the number of windows in a tab? #107

Answered by nanozuki
luiz00martins asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for my lateness, I was so busy in the last two months.

The tab.wins is not an array, this object has wins and foreach two attributes. So, you can get the windows' count, you can use:

local win_count = #wins.wins

Or other low level way:

local api = require('tabby.module.api')
local wins = api.get_tab_wins(tabid)
local win_count = #wins

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by luiz00martins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants