-
Notifications
You must be signed in to change notification settings - Fork 132
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
bug: Error when opening a new tab if Oil is currently open #40
Comments
Thanks for the report, and the kind words! This actually was causing a bug, just subtly. It was interfering with resetting the window options after leaving an oil buffer after you |
This now gives a more classic error when the new buffer AND the current buffer is the pwd. nvim .
:tabnew . Error executing vim.schedule lua callback: /home/rory/.local/share/nvim/lazy/oil.nvim/l
ua/oil/util.lua:130: Invalid buffer id: 5
stack traceback:
[C]: in function '__index'
/home/rory/.local/share/nvim/lazy/oil.nvim/lua/oil/util.lua:130: in function </
home/rory/.local/share/nvim/lazy/oil.nvim/lua/oil/util.lua:121> Also interesting notes:
|
Ah, it's more race conditions. There's more edge cases around the netrw conflicts than I thought :/ The first part of this is fixed. Still working on that last one. |
Well I've wrestled with it for a while now, but I've hit a case that I can't figure out how to handle gracefully. It's triggered by |
Yeah that sounds like a fair solution. In practice now I see netrw for just a split second once per session, and the cursor position changes in the new tab. Both things being pretty non-issues considering how rare this actually comes up in real use |
Did you check the docs and existing issues?
Neovim version (nvim -v)
NVIM v0.8.2
Operating system/version
Endeavour OS
Describe the bug
If you're currently looking at an Oil buffer and you use the command
tabedit
ortabnew
it pops up with an errorOil split could not find parent window. Please try to replicate whatever you just did and report a bug on github
So I'm doing that. Other than this displaying everything seems to work as expected
Steps To Reproduce
nvim .
:tabnew
Expected Behavior
Oil to not needlessly worry
Everything is fine, stress is bad for a young plugin, you're doing great <3
Directory structure
No response
Repro
Did you check the bug with a clean config?
nvim -u repro.lua
using the repro.lua file above.The text was updated successfully, but these errors were encountered: