Skip to content

BUG: hide_root_node = true and creating file freezes nvim #410

@pysan3

Description

@pysan3

Hi, Thanks for the awesome plugin :)

I stumbled across a fatal error that freezes my nvim completely with the following setup.

Reproduce

  • Config
require("neo-tree").setup({
  hide_root_node = true,
  filesystem = {
    follow_current_file = true,
  },
})
  • Example File Structure
- root/
  - dir-A/
    - dir-A-B/
      - file-A-B-C.lua <- current file
  - file-B.lua
  1. Open a file that is 2 or more deeper than cwd. (file-A-B-C.lua)
  2. Open Neotree with :Neotree toggle<CR>.
  3. (cursor is focused on file-A-B-C.lua on open by setting config filesystem.follow_current_file = true)
  4. Press G to go to the end of buffer. (cursor focus on file-B.lua)
  5. Press a or A to create new file / dir.
  6. Nvim freezes.

Notes

  • Not happening with hide_root_node = false.
  • neo-tree

Details

  • nvim --version output:

    • NVIM v0.8.0-dev+nightly
    • Build type: RelWithDebInfo
    • LuaJIT 2.1.0-beta3
  • Operating system: 5.10.102.1-microsoft-standard-WSL2

  • Screen Record

neo-tree

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions