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 nvim tree frozen with no name buffer #1879

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

chomosuke
Copy link
Collaborator

closes #1878.

Thanks for raising this one @alex-courtis.

The issue turned out to be path never becoming cwd or "/" no matter how many fnamemodify(path, ":h"). This bug would've also appeared if a file out side of the cwd is modified on windows as path would've stopped at "C:\\" instead of "/".

I've made it so that:

  • ignore buffer for modified if buf.name is ""
  • Don't keep looking for parents if the path is already recorded as modified, or if fnamemodify didn't change the path.

Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nicely, thanks for the quick fix.

@alex-courtis alex-courtis merged commit cdbd7da into master Jan 3, 2023
@chomosuke chomosuke deleted the 1878-fix-nvim-frozen-on-no-name-buf branch January 3, 2023 02:36
alex-courtis added a commit that referenced this pull request Jan 9, 2023
…uire_confirm (#1887)

* fix(#1878): nvim frozen on no name buffer when modified.enable (#1879)

* feat(api): add api.config.mappings.active, api.config.mappings.default (#1876)

* feat(api): add config.mappings.current and config.mappings.default

* feat(api): add config.mappings.current and config.mappings.default

* feat(api): add config.mappings.current and config.mappings.default

* Implement turning off y/n prompt for file deletion

* Refactor different prompt configs to single ui table

* Remove unused fields

* add ui.confirm doc, format/tidy

* trash.require_confirm -> ui.confirm.trash

* Fix nil value trash field

Co-authored-by: Richard Li <38484873+chomosuke@users.noreply.github.com>
Co-authored-by: Telman Babayev <babayevtolman@gmail.com>
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.

nvim 100% CPU And Frozen When modified.enabled = true
2 participants