-
-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Invalid window id #2859
Comments
This is weird. I will try in an even cleaner environment.
I understand - but I can't: If I leave away only 1 plugin the issue goes away. I really spent a long time to reduce as much as possible. This is the best I could achieve. But let me now first find out why you can't reproduce it. Maybe the fzf version is also relevant ( |
I can also reproduce it in a completely new user environment. And also with the latest version of fzf ( I started debugging myself now. I have no idea what to look for so I changed the location of the error around if laststatus == 3 then
local tp = vim.api.nvim_get_current_tabpage()
local wids = vim.api.nvim_tabpage_list_wins(tp)
print("wids", vim.inspect(wids))
print("usable_win_ids()", vim.inspect(usable_win_ids()))
print("selectable", vim.inspect(selectable))
print("not_selectable", vim.inspect(not_selectable))
for _, id in ipairs(not_selectable) do
for opt, value in pairs(win_opts[id]) do
if vim.fn.has "nvim-0.10" == 1 then
vim.api.nvim_set_option_value(opt, value, { win = id })
else
vim.api.nvim_win_set_option(id, opt, value) ---@diagnostic disable-line: deprecated
end
end
end
end This is what I get:
So it seems the list of |
That sounds about right.
Please share the init.vim/lua and instructions for reproduction. |
The instructions are already above. I just created a new user and sudoed into it:
And the if has('vim_starting')
set encoding=utf-8
endif
scriptencoding utf-8
if &compatible
set nocompatible
endif
let s:plug_dir = stdpath('data') . '/plugged'
if !filereadable(s:plug_dir .. '/plug.vim')
execute printf('!curl -fLo %s/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim', s:plug_dir)
end
execute 'set runtimepath+=' . s:plug_dir
call plug#begin()
Plug 'vim-airline/vim-airline'
Plug 'nvim-tree/nvim-tree.lua'
Plug 'ibhagwan/fzf-lua', { 'branch': 'main' }
Plug 'b0o/incline.nvim'
call plug#end()
PlugInstall | quit
let g:loaded_netrw = 1
let g:loaded_netrwPlugin = 1
set laststatus=3 " always show the status line
lua << EOF
require('fzf-lua').setup()
require('incline').setup()
require('nvim-tree').setup()
EOF
let mapleader = ',' " Map <leader> to , instead of default \
nmap <leader>t <Cmd>NvimTreeFindFileToggle<CR>
nmap <leader>/ <Cmd>FzfLua live_grep path_shorten=false<CR> |
That's a really way to do a completely clean replication! |
Co-authored-by: Alexander Courtis <[email protected]>
Description
I get this error when I try to open a file under certain conditions:
I'm unsure if nvim-tree is really the root problem. I had to play around a lot to find the minmal set of plugins to reproduce the issue:
Neovim version
Operating system and version
Linux Mint 21.3
Windows variant
No response
nvim-tree version
48d0e82
Clean room replication
Steps to reproduce
mkdir test && cd test
touch {a,b,c}.txt
echo aaa > a.txt && echo aaa > c.txt
nvim -u /path/to/above/minimal.vim -o a.txt b.txt
,
+t
(to open nvim-tree)You should now have this condition. Active window must be tree:

Now trigger a fzf grep with

,
+/
and enteraaa
Pick file
c.txt
with<c-j>
followed by<CR>
You should get a window selection (A or B).

Press
A
to select upper window.Expected behavior
There should be no error
Actual behavior
The text was updated successfully, but these errors were encountered: