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

no name file always open whenever i open something from nerd tree #22

Closed
Aneeqasif opened this issue Sep 23, 2022 · 6 comments · Fixed by #30
Closed

no name file always open whenever i open something from nerd tree #22

Aneeqasif opened this issue Sep 23, 2022 · 6 comments · Fixed by #30

Comments

@Aneeqasif
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. open any file
  2. CTRL n and open a new file
  3. now there are 3 things open , two files that i open , third imposter with name of No Name

Expected behavior
only two intended file open
no No Name fuckery
Screenshots
Peek 2022-09-23 19-30

@siduck siduck transferred this issue from NvChad/NvChad Sep 23, 2022
@Aneeqasif
Copy link
Author

any update on this?

@siduck
Copy link
Member

siduck commented Sep 24, 2022

i cant reproduce

@Aneeqasif
Copy link
Author

may be these's something that causing in my config i am trying different things but cannt figure out
www.github.comAneeqasif/temp-nvj

may be you can spot the bug or suggest something better

@Aneeqasif
Copy link
Author

any update sir?

@siduck
Copy link
Member

siduck commented Sep 29, 2022

@Aneeqasif does this happen with bufferline.nvim plugin?

@lll9p
Copy link
Contributor

lll9p commented Nov 3, 2022

I think I solved this issue, We should use vim.api.nvim_buf_is_valid and vim.bo[bufnr].buflisted to detect if buf is valid, like #30 .

siduck pushed a commit that referenced this issue Nov 11, 2022
…ent buf to new tab (#30)

* Fix(tabufline): fixed incorrect buf validity check

Combine `vim.api.nvim_buf_is_valid` with `vim.bo[bufnr].buflisted` to verify the validity of buf. Fix #22

* Fix(tabufline): fixed adding current buf to new tab

Current behavior: When a new tab is created, the current buf is also added to it.
Fix: add `event ~= BufAdd` to prevent adding current buf.

* Fix(tabufline): fixed adding current buf to new tab

To reproduce: open any file, PackerCompile, then tabnew.

* Fix(tabufline): fixed adding current buf to new tab, again.

To reproduce: open any file, run checkhealth.

* Delete utils.lua

* Fix(tabufline): move the isBufValid function to init.lua
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 a pull request may close this issue.

3 participants