Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: toggle tabline when tab added w/o new buffer #902

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lua/bufferline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ end
--- If the item count has changed and the next tabline status is different then update it
local function toggle_bufferline()
if not config.options.auto_toggle_bufferline then return end
local item_count = config:is_tabline() and utils.get_tab_count() or utils.get_buf_count()
local item_count = config:is_tabline() and utils.get_tab_count()
or utils.get_buf_count() + (config.options.show_tab_indicators and (utils.get_tab_count() - 1) or 0)
local status = (config.options.always_show_bufferline or item_count > 1) and 2 or 0
if vim.o.showtabline ~= status then vim.o.showtabline = status end
end
Expand Down
Loading