Closed kbwhodat closed 1 year ago
It looks like display.lua
saves the guicursor
option on line 288, and then the option should be reset on the BufLeave autocmd, on line 314. I'm not sure what's going wrong but I'd wager it's something happening there.
+1. I have the same issue. For what it's worth, I am using Mac and iTerm with Neovim installed via Homebrew:
> nvim --version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.8.3/share/nvim"
Run :checkhealth for more info
Here is my Neovim config if you want to reproduce. Grep for nvim-navbuddy
in it and uncomment the sections where it comes up.
I don't understand how this can happen. I have set BufLeave command to restore guicursor but it seems its not getting triggered for you 🤔 . Will look into this 👍🏽
Not sure if it's related but it seems actions.close
is repeating a lot of the behavior of the autocmd
Can you guys paste the output of set guicursor
before and after the cursor disappears? Lets confirm that guicursor is actually not getting restored or not.
I am unable to reproduce this issue, even bare bones config file.
Ok, with dotfiles share by @rochakgupta I am able to reproduce this issue. 👍🏽
Oh man! I see whats happening, atleast in case of @rochakgupta You have guicursor set to empty string. And on startup it seems to remember the default cursor's starting state, which is block. Then navbuddy modifies it temporarily to hide the cursor inside the window, and correctly restores it to the empty string. But then it seems to remember the new state set by navbuddy, hence it disappears.
I see you are setting it to empty because you don't want it to be a thin line in insert mode. For that the proper setting would be
vim.o.guicursor = "a:block"
Are the rest of you folks also setting guicursor to empty string? @JamesDevlin5 @kbwhodat @Sammo98
The only way to resolve this I see is that either the user can set guicursor to non blank value. Or if it is blank value, Navbuddy shouldn't modifiy it in any way, it will cause the cursor to appear in the middle window, ruining the aesthetics, but its better than leaving user with no cursor I guess.
I'm actually not having the issue, just wanted to help
@SmiteshP
Confirmed that I have vim.opt.guicursor = ""
in my config and setting it to a:block
fixes the bug.
@Sammo98 You can try the latest commit. If you wish to keep the guicursor as blank it won't vanish when you close navbuddy. Only compromise would be the cursor would still remain visible in Navbuddy window.
@SmiteshP
Setting guicursor to a:block
solved the issue for me. Thanks for the quick turnaround.
switching to a:block also resolved the issue for me. Thanks for the help
My cursor seems to disappear after using Navbuddy. I removed all my plugins just in case there were any conflicts but still no luck.
https://user-images.githubusercontent.com/83613282/228038548-3880ae55-00ad-46c5-98fa-b16d44cfedf4.mov