Closed
Description
Description
- Toggle nvim-tree to actived.
- Open A file
- Press
<C-w><C-w>
to switchnvim-tree
window as actived. - Selected B file and then press
<C-v>
to use vsplit open. - Now, the windows link that: |
nvim-tree
|B file
|A File
| - Switch
nvim-tree
window as actived. - Selected C file and then press
<C-v>
to use vsplit open. - Now it would has a prompt to pick window for A or B ? It would open the C file as a new window neither select A or select B.
Neovim version
NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
编译者 brew@BigSur
Features: +acl +iconv +tui
See ":help feature-compile"
系统 vimrc 文件: "$VIM/sysinit.vim"
$VIM 预设值: "/usr/local/Cellar/neovim/0.7.0/share/nvim"
Run :checkhealth for more info
Operating system and version
macOS 11.5
nvim-tree version
Steps to reproduce
nvim
:NvimTreeToggle
- Select A file and press
<CR>
, open A file as a new window normally. <C-w><C-w>
, swith into nvimtree window.- Select B file and press
<C-v>
, open B file as a new split window. - Now, the windows link that: |
nvim-tree
|B file
|A File
| <C-w><C-w><C-w><C-w>
, swith into nvimtree window.- Select C file and press
<C-v>
, it would has a prompt to pick window for A or B ? It would open the C file as a new window neither select A or select B.
Expected behavior
Pick window correctlly when open file with vsplit.
Actual behavior
Open file as a new split window neither select window A o window B.
Minimal config
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvt-min/site]]
local package_root = "/tmp/nvt-min/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
require("packer").startup {
{
"wbthomason/packer.nvim",
"kyazdani42/nvim-tree.lua",
"kyazdani42/nvim-web-devicons",
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config = {
package_root = package_root,
compile_path = install_path .. "/plugin/packer_compiled.lua",
display = { non_interactive = true },
},
}
end
if vim.fn.isdirectory(install_path) == 0 then
print "Installing nvim-tree and dependencies."
vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
end
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]]
vim.opt.termguicolors = true
vim.opt.cursorline = true
-- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
_G.setup = function()
require("nvim-tree").setup {}
end