Skip to content

augroups: Fix showtabline in toggle function - #218

Open
Marquichou wants to merge 1 commit into
willothy:mainfrom
Marquichou:main
Open

Marquichou wants to merge 1 commit into
willothy:mainfrom
Marquichou:main

Conversation

@Marquichou

Copy link
Copy Markdown

The toggle function in the augroups file is called on the VimEnter and BufAdd events.

In my configuration, I set:

show_if_buffers_are_at_least = 0

When the VimEnter event is emitted, there are no listed buffers yet.
As a result, opt.showtabline is set to 0.

I think show_if_buffers_are_at_least should also be taken into account
when determining the value of opt.showtabline. This change compares the
number of listed buffers with show_if_buffers_are_at_least before
overriding the option.

What do you think of this approach?

Thanks for this great plugin!

Compare listed_buffers with show_if_buffers_are_at_least when
overriding opt.showtabline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant