Skip to content
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

Cursor remains hidden after closing the popup #114

Closed
isaif opened this issue Oct 25, 2022 · 13 comments · Fixed by #639
Closed

Cursor remains hidden after closing the popup #114

isaif opened this issue Oct 25, 2022 · 13 comments · Fixed by #639
Labels
bug Something isn't working

Comments

@isaif
Copy link

isaif commented Oct 25, 2022

Describe the bug
Cursor remain hidden after closing the popup. This doesn't happen if I use minimal setup provided.
How should I go about finding the cause of this issue?

Which version of Neovim are you using?
nightly

To Reproduce
Steps to reproduce the behavior:

  1. open command line ":" or search "/"
  2. run it or close it
  3. cursor is not visible anymore

Expected Behavior
Cursor should be visible

image

image

cursor is not visible anymore
image

Noice Log
Please include any related errors from the Noice log file. (open with :Noice log)

Noice log
...m/site/pack/packer/opt/noice.nvim/lua/noice/view/nui.lua:162: Failed to delete line

stack traceback:
[C]: in function 'pcall'
.../site/pack/packer/opt/noice.nvim/lua/noice/util/call.lua:140: in function <.../site/pack/packer/opt/noice.nvim/lua/noice/util/call.lua:139>
[C]: in function 'nvim_buf_set_lines'
...m/site/pack/packer/opt/noice.nvim/lua/noice/view/nui.lua:162: in function <...m/site/pack/packer/opt/noice.nvim/lua/noice/view/nui.lua:148>
[C]: in function 'xpcall'
.../site/pack/packer/opt/noice.nvim/lua/noice/util/call.lua:145: in function 'try'
.../site/pack/packer/opt/noice.nvim/lua/noice/view/init.lua:122: in function 'display'
...
[C]: in function 'xpcall'
.../site/pack/packer/opt/noice.nvim/lua/noice/util/call.lua:145: in function 'try'
...site/pack/packer/opt/noice.nvim/lua/noice/util/hacks.lua:92: in function 'cmd'
...ack/packer/start/nvim-notify/lua/notify/service/init.lua:63: in function 'push'
...site/pack/packer/opt/noice.nvim/lua/noice/util/hacks.lua:200: in function 'push'
...m/site/pack/packer/start/nvim-notify/lua/notify/init.lua:223: in function 'notify'
.../site/pack/packer/opt/noice.nvim/lua/noice/util/init.lua:183: in function 'notify'
.../site/pack/packer/opt/noice.nvim/lua/noice/util/init.lua:227: in function <.../site/pack/packer/opt/noice.nvim/lua/noice/util/init.lua:226>
[C]: in function 'pcall'
.../site/pack/packer/opt/noice.nvim/lua/noice/util/call.lua:124: in function <.../site/pack/packer/opt/noice.nvim/lua/noice/util/call.lua:122>

@isaif isaif added the bug Something isn't working label Oct 25, 2022
@folke
Copy link
Owner

folke commented Oct 25, 2022

Does the cursor show when doing :lua require("noice.util.hacks").show_cursor() after that?

@isaif
Copy link
Author

isaif commented Oct 25, 2022

Does the cursor show when doing :lua require("noice.util.hacks").show_cursor() after that?

No, it doesn't.

@folke
Copy link
Owner

folke commented Oct 25, 2022

Can you try again? Just pushed some changes

@isaif
Copy link
Author

isaif commented Oct 25, 2022

I did the packersync and still same problem exists.

:lua require("noice.util.hacks").show_cursor() doesn't help either.

@folke
Copy link
Owner

folke commented Oct 25, 2022

That's really odd. Do you set guicursor somewhere in your config?

What does :set guicursor? give after it's gone?

And does :set guicursor= restore the cursor?

Are you using a gui?

@isaif
Copy link
Author

isaif commented Oct 25, 2022

I had vim.opt.guicursor = '' " to keep cursor as block in insert mode. I didn't know this caused the issue.

Sorry for taking so much of your time.

Thanks for your time.

@folke
Copy link
Owner

folke commented Oct 25, 2022

It's weird that that worked before. Setting the guicursor="", disables the cursor I believe.

Check for the options :h guicursor

@folke folke closed this as completed Oct 25, 2022
@gongfarmer
Copy link

+1. I hit this same problem.
Had to stop using noice for a few days, until I found this bug report.
If this is common enough, might be worth a warning in checkhealth.

@folke folke reopened this Nov 10, 2022
@folke
Copy link
Owner

folke commented Nov 10, 2022

Something weird is happening with guicursor="". I'm looking into it.

@folke folke closed this as completed in 3710528 Nov 10, 2022
@folke
Copy link
Owner

folke commented Nov 10, 2022

I think I was able to fix it. Something weird is happening internally with Neovim and setting the guicursor. It seems that setting it, only comes into effect after some time. And setting it again in between it is active, doesn't use the new value.

Adding a delay before resetting it seems to fix it

@isaif
Copy link
Author

isaif commented May 27, 2023

I changed it to vim.opt.guicursor = 'a:block' instead and my issue was fixed.

@theherk
Copy link

theherk commented Sep 12, 2023

I'm in a similar situation, and though this is closed I'm still not clear on the resolution. I set vim.o.guicursor = vim.o.guicursor .. ",a:blinkon1", but when closing a popup from https://github.com/voldikss/vim-browser-search, my cursor is gone. Neither resetting the value of guicursor nor using the show_cursor() function has any effect. The value remains a:NoiceHiddenCursor. What have I overlooked?

eta: Actually, this problem arises even if I do not set guicursor in configuration at all.

@konosubakonoakua
Copy link

konosubakonoakua commented Mar 26, 2024

I have encountered the same issue after close cmdline popup recently, with vim.opt.guicursor = "a:block".
Seems that the issue has never gone. I'm also trying to reproduced this without setting guicursor at all.
@folke @theherk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants