Closed
Description
Description
If I cd into an empty directory and try to paste from clipboard nothing happens.
Neovim version
NVIM v0.9.0-dev-5e1687e-dirty
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Operating system and version
Arch Linux x86_64 6.0.7-arch1-1
nvim-tree version
latest master
Minimal config
local fn = vim.fn
-- Ignore default config and plugins and define new dirs
local test_dir = '/tmp/nvim-minimal'
vim.opt.runtimepath:remove(fn.expand('~/.config/nvim'))
vim.opt.packpath:remove(fn.expand('~/.local/share/nvim/site'))
vim.opt.runtimepath:append(fn.expand(test_dir))
vim.opt.packpath:append(fn.expand(test_dir))
-- Install packer
local install_path = test_dir .. '/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
packer_bootstrap = fn.system({
'git',
'clone',
'--depth',
'1',
'https://github.com/wbthomason/packer.nvim',
install_path,
})
vim.cmd('packadd packer.nvim')
end
-- Setup packer
local packer = require('packer')
packer.init({
package_root = test_dir .. '/pack',
compile_path = test_dir .. '/plugin/packer_compiled.lua',
})
packer.startup(function(use)
use('wbthomason/packer.nvim')
use('nvim-tree/nvim-tree.lua')
if packer_bootstrap then
packer.sync()
end
end)
-- Plugin setup
local ok, nvimtree = pcall(require, 'nvim-tree')
if ok then
local tree_cb = require('nvim-tree.config').nvim_tree_callback
local map_list = {
{ key = '<C-o>', cb = tree_cb('cd') },
{ key = 'u', cb = tree_cb('dir_up') },
{ key = 'F', cb = tree_cb('create') },
{ key = 'c', cb = tree_cb('copy') },
{ key = 'p', cb = tree_cb('paste') },
{ key = 'd', cb = tree_cb('remove') },
}
nvimtree.setup({
view = {
mappings = {
custom_only = true,
list = map_list,
},
},
})
end
Steps to reproduce
As in the GIF
- Open nvim in a directory with
a.txt
and inner empty directory (inner
) in my example - Run
:NvimTreeOpen
to open the tree - Press
c
to copy thea.txt
file into the clipboard - Press
C-o
oninner
to cd into that empty directory - Press
p
to paste into this empty directory -> nothing happens - Press
F
to create a fileb.txt
- Press
p
again to paste from clipboard -> the filea.txt
file is now pasted
Expected behavior
After 5. above I expect to be able to paste the a.txt
clipboard file
Actual behavior
After 5. nothing happens