nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NvimTree changes root in the other tab after it is reopened

carljohnson93 opened this issue · comments

Description

When nvim-tree is opened in one tab, then in the other and I change directory with <c-]> there, then go back to previous tab and reopen nvim-tree it loads the directory which I cded into from the other tab.

Neovim version

NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

Artix Linux latest release, also tested on macOS 10.15.7

nvim-tree version

02fdc26

Minimal config

vim.cmd[[
call plug#begin()

Plug 'nvim-tree/nvim-tree.lua'

call plug#begin()
]]

require('nvim-tree').setup()

Steps to reproduce

  1. nvim
  2. :NvimTreeToggle
  3. :tabnew
  4. :NvimTreeToggle
  5. cd into any directory with <c-]>
  6. :tabprev
  7. :NvimTreeToggle
  8. :NvimTreeToggle

Expected behavior

Expected for nvim tree to reopen its window and load same directory I was in just before closing it in this tab

Actual behavior

nvim-tree loads the last opened directory, in this case the one we cded into from the other tab

Tracked at #457

Tracking at