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

A strange delay when closing a buffer #21

Closed
lcfd opened this issue Oct 3, 2022 · 4 comments
Closed

A strange delay when closing a buffer #21

lcfd opened this issue Oct 3, 2022 · 4 comments

Comments

@lcfd
Copy link

lcfd commented Oct 3, 2022

Hi!

Maybe it's only me but I'm experiencing a strange delay when I delete a buffer.
The usual :bdelete is much faster.

I run the command using a keystroke:

vim.keymap.set("n", "<leader>c", "<cmd>Bdelete<cr>")

Is it correct?

@famiu
Copy link
Owner

famiu commented Oct 3, 2022

Yes, a slight delay is expected since Bdelete has to do more processing prior to invoking :bdelete but it shouldn't even be noticable. It's weird that you're seeing a delay. Do you have a lot of buffers open? Maybe a plugin is causing a lot of hidden buffers to be opened? Can you reproduce the lag with nvim --clean with just bufdelete.nvim

@lcfd
Copy link
Author

lcfd commented Oct 3, 2022

I'll do some tests! Maybe with some usage I'll discover more.

Thank you for your time!

@famiu
Copy link
Owner

famiu commented Oct 4, 2022

BTW, until we can find some concrete benchmarks that are consistently reproducible, I'm going to be closing this issue. Feel free to reopen if you can provide that.

@famiu famiu closed this as completed Oct 4, 2022
@erodactyl
Copy link

@lcfd I had the same issue, turns out I had a keymap ca for code actions so it was waiting to see if I also click "a". Removing that keymap fixed the delay it's super fast now.

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

No branches or pull requests

3 participants