-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 doesn't change back to what's specified in the settings.json #9081
Comments
Huh, interesting. I wonder how they're changing the cursor shape. If they're doing it with the legacy APIs, then there's probably no way for them to get it back to a vertical bar. If they're using VT (which they should be), then this should work... |
I don't know if it helps, but the same thing happens when I use NeoVim on WSL, or even while SSH'ing into a remote Ubuntu server. |
nvim is not restoring the cursor on exit using |
(This should be filed upstream on nvim.) |
Looks like they already have that open neovim/neovim#12283 neovim/neovim#6779 neovim/neovim#4396 |
No surprise here, but this also affects |
I'm having the same issue with the cursor and I was wondering if the problem lies with neovim or Windows Terminal. After some experiments, I noticed that when using any other terminal emulator (for instance, the WSL Ubuntu default terminal, or the powershell emulator, or even CMD), the problem with cursor on neovim exit does not exist. I'm afraid Windows Terminal is the only emulator I see that has this problem. |
@ianpan870102 I think you're confusing a terminal with a shell. The Neovim bug exists on all terminals (mintty, alacritty, xfce4-terminal, conhost, Windows Terminal, ConEmu etc.). It's independent of any shell (PowerShell, CMD, Cygwin-Bash, WSL etc.) |
@rashil2000 I don't think I've confused them. I really meant "terminals / terminal emulators". I tried my experience with the WSL Ubuntu default terminal, or the terminal emulator that comes with Powershell, or the terminal emulator that comes with CMD, all using WSL zsh as the shell to run neovim. p.s. In other words, I launched Powershell's default terminal and ran the |
FYI, all these are different shells in the same terminal, called |
I see. Could I then say that from my experience, "conhost.exe" is not affected by the cursor issue, and only Windows Terminal is? |
I think the reason conhost is unaffected is different. It is known to reset cursor shapes on its own. I'm not aware if it's been fully fixed yet. In my experience though, all the other terminals I mentioned in my previous comment suffer from this issue, so I'm kinda certain it's not just Windows Terminal; it has something to do with Neovim itself. |
No its not. This issue is only faced when exiting NeoVim on Windows Terminal. I have tried to do so in Alacritty and everything is working fine on Alacritty. |
I am also suffering from this problem. It is unique to using nvim in a Windows terminal. Using the old style terminal properly restores the cursor. When using normal vim in a windows terminal, I can get the problem fixed by adding the line: |
This cursor bug is still present for me only while using the Windows Terminal(WT). Vim changes the cursor accordingly while using cmd, powershell, and pwsh but not WT. I've deleted vimrc but the bug is still there. It seems like the setting.json file doesn't allow vim to change cursors when you switch modes. Whatever cursor you have set in WT will be the cursor for all vim modes. Does anyone got any suggestions or a work around? |
@Tainted-Fool What you're describing is a different issue. The Windows version of vim is probably using the |
I can confirm that this is not just a Windows Terminal issue, but is more likely related to Neovim itself. I am using PowerShell 7 from within wezterm, and I have the same issue. |
This issue also happened to me with programs like newsboat through wsl where the cursor would become invisible. |
I am facing this issue with Windows Terminal. The issue does not occur when using |
Environment
Steps to reproduce
Set your cursor to 'bar' style. Open WT. Run
nvim
. The cursor inside neovim is a block cursor. Exit neovim now.Expected behavior
The cursor should turn back to bar style.
Actual behavior
The cursor remains in block style.
The text was updated successfully, but these errors were encountered: