Skip to content

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.

@chomosuke chomosuke requested a review from alex-courtis January 3, 2023 00:15
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 <[email protected]>
Co-authored-by: Telman Babayev <[email protected]>
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