Closed NStefan002 closed 2 months ago
Are you still having this problem? I tried recreating the issue, but I couldn't get it to fail on nvim 0.10.1 and oil 2.12.0.
I wouldn't mind helping out if you are still experiencing this issue.
@csponge I can still reproduce this problem with oil 2.12.0 on both neovim stable and nightly.
@NStefan002, okay. I'll keep playing around with it. I'll let you know if I find anything.
@NStefan002, I think I might have found a fix. It seems that the initialize
function in lua/oil/view.lua
was getting called after loading the file in the jumplist. It was calling set_win_options
without any checks on the filetype. I added a check for filetype before setting win_options
.
Since I made that change, I haven't seen the issue. However, I only got it to fail around 1-2 times out of 10 before the fix. I'm probably not timing the keystrokes correctly. With that said, would you be willing to test my fork out before I make a pull request?
You can find it here:
https://github.com/csponge/oil.nvim/tree/bug/win_options-applied-to-first-buffer
Let me know if that resolves your issue.
@csponge I think you fixed it! I can't reproduce the problematic behavior anymore (note that I could reproduce it about 80-90 percent of the time). Good work, thank you!
Did you check the docs and existing issues?
Neovim version (nvim -v)
0.10.0
Operating system/version
Ubuntu 22.04.4 LTS
Describe the bug
When starting the new neovim instance with
nvim <dir_name>
and instantly using something like<C-o>
,<C-i>
or harpoon jump the first opened buffer has nosigncolumn
nornumber
orrelativenumber
(basicallywin_options
get applied to the first buffer/window opened after Oil loads).https://github.com/stevearc/oil.nvim/assets/100767853/b825d6ab-cb3f-4a6c-9cfb-11d207a8c193
In the video, you can see that I press
<C-o>
right as the Oil is loading.What is the severity of this bug?
minor (annoyance)
Steps To Reproduce
nvim -u repro.lua dir/
<C-o>
(if the jumplist is empty just open up a file and pressG
, that should create one entry in the jumplist and then redo steps 1 and 2)Expected Behavior
Buffer/window opened using the mentioned methods should have
statuscolumn
,number
, andrelativenumber
(if they're set in the neovim config directory, of course).Directory structure
dir/1.lua
Repro
Did you check the bug with a clean config?
nvim -u repro.lua
using the repro.lua file above.