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 deletion not closing open deleted buffers #109

Merged
merged 3 commits into from
Jun 5, 2024

Conversation

mikavilpas
Copy link
Owner

fix: open buffers deleted in yazi were not closed

When a buffer was opened in neovim and being edited, and then yazi
deleted it, the buffer was not closed. I'm not sure what broke it.

The fix is to close the buffer asynchronously. I don't understand why
that fixes the issue, but it does.

vim.await is really cool. I found it here:
https://www.reddit.com/r/neovim/comments/1cv5q45/comment/l4s2ya0/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

perf: processing open buffers only processes normal buffers

Buffers are processed when renaming, deleting, and trashing files in
yazi. Previously all open buffers were processed, but now only normal
buffers are.

This actually doesn't have a big impact on performance. I just wanted to
have a perf commit in the history 😄. Perhaps in big projects it might
be noticeable, or if some future feature will require more performance.

Buffers are processed when renaming, deleting, and trashing files in
yazi. Previously all open buffers were processed, but now only normal
buffers are.

This actually doesn't have a big impact on performance. I just wanted to
have a `perf` commit in the history 😄. Perhaps in big projects it might
be noticeable, or if some future feature will require more performance.
When a buffer was opened in neovim and being edited, and then yazi
deleted it, the buffer was not closed. I'm not sure what broke it.

The fix is to close the buffer asynchronously. I don't understand why
that fixes the issue, but it does.

`vim.await` is really cool. I found it here:
https://www.reddit.com/r/neovim/comments/1cv5q45/comment/l4s2ya0/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
@mikavilpas mikavilpas merged commit 6dc4a48 into master Jun 5, 2024
14 checks passed
@mikavilpas mikavilpas deleted the fix-deletion-not-closing-open-deleted-buffers branch June 5, 2024 19:30
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