Skip to content

Cannot add files when PWD is empty directory #1467

Closed
@kputnam

Description

@kputnam

Description

When hide_root_folder is true, the 'a' keymap which normally prompts to add a file in the NvimTree window doesn't work when your root directory is empty.

I suspect this function or its caller may be at issue.

Neovim version

NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

Operating system and version

macOS 12.4

nvim-tree version

0f96e32

Minimal config

require("nvim-tree").setup({ view = { hide_root_folder = true }})

Steps to reproduce

  1. mkdir emptydir
  2. cd emptydir
  3. nvim
  4. :NvimTreeOpen
  5. Press the [a] key

Expected behavior

"Create file " prompt should appear.

Actual behavior

Nothing happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions