Skip to content

Commit a7edd15

Browse files
committed
fix: respect tab count in toggle_bufferline()
Change `toggle_bufferline()` fallback value for `vim.o.showtabline` from 0 (always hide tabline) to 1 (show tabline if multiple tabpages exist). This should fix akinsho#925.
1 parent 0b2fd86 commit a7edd15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lua/bufferline.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ end
9090
local function toggle_bufferline()
9191
if not config.options.auto_toggle_bufferline then return end
9292
local item_count = config:is_tabline() and utils.get_tab_count() or utils.get_buf_count()
93-
local status = (config.options.always_show_bufferline or item_count > 1) and 2 or 0
93+
local status = (config.options.always_show_bufferline or item_count > 1) and 2 or 1
9494
if vim.o.showtabline ~= status then vim.o.showtabline = status end
9595
end
9696

0 commit comments

Comments
 (0)