diff options
Diffstat (limited to 'lua/luatab')
-rw-r--r-- | lua/luatab/init.lua | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lua/luatab/init.lua b/lua/luatab/init.lua index e4967f4..0d4a86d 100644 --- a/lua/luatab/init.lua +++ b/lua/luatab/init.lua @@ -34,11 +34,7 @@ M.modified = function(bufnr) end M.windowCount = function(index) - local nwins = 0 - local success, wins = pcall(vim.api.nvim_tabpage_list_wins, index) - if success then - for _ in pairs(wins) do nwins = nwins + 1 end - end + local nwins = vim.fn.tabpagewinnr(index, '$') return nwins > 1 and '(' .. nwins .. ') ' or '' end |