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: buffer name not updated sometimes #167

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

ilan-schemoul
Copy link
Contributor

@ilan-schemoul ilan-schemoul commented Nov 30, 2024

Fixes #160 where buf_name can be undefined ([no name] shown to the user)
under certain conditions.

Culrpit was commit 96a392b which removed events BufWinEnter,
BufWinLeave, BufDelete. This reintroduces these three events in autocmd
of win_name.

96a392b did not justify the change of events so I'm not confident of my commit. If you don't agree with this commit you can go ahead and edit it.

BTW at first I thought the bug was in lua/tabby/feature/buf_name.lua but this only defines the name of the buffer if you use the API bufs. The culprit is in win_name.lua because I use the API win.buf_name()

I don't think buf_name.lua should be impacted by the bug because well <C-o>/<C-i> does not change the list of buffers it just changes the buffer inside a window. So only the window API is concerned by this.

Fixes nanozuki#160 where buf_name can be undefined ([no name] shown to the user)
under certain conditions.

Culrpit was commit 96a392b which removed events BufWinEnter,
BufWinLeave, BufDelete. This reintroduces these three events in autocmd
of win_name.
@nanozuki nanozuki merged commit 9705aee into nanozuki:main Dec 1, 2024
1 check passed
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.

[Help wanted] buffer names always defaults to "No Name"
2 participants