Skip to content

Cursor does not focus on file created when creating file with nested directory #1716

Closed
@GZLiew

Description

@GZLiew

Description

Cursor does not focus on file created when creating file with nested directory

Neovim version

NVIM v0.7.2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Operating system and version

Linux-5.19.12

nvim-tree version

6ca6f99

Minimal config

require("nvim-tree").setup({
  update_focused_file = {
    enable = true
  },
  git = {
    ignore = false
  },
  actions = {
    open_file = {
      quit_on_open = true
    }
  },
  view = {
    width = 200,
    number = true,
    relativenumber = true,
    side = 'left',
    mappings = {
      list = {
        { key = "-", cb = tree_cb("close") },
        { key = { "<BS>", "<C-o>" }, action = "close_node" },
      }
    }
  }
})

Steps to reproduce

  1. nvim
  2. a
  3. somefolder/anotherfolder/a.c
  4. cursor focuses on the top of the tree

Expected behavior

Cursor should focus on the top of the tree

image

Actual behavior

Cursor should focus on the file created

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreproducedIssue confirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions