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 stops blinking after entering vim/tmux #133

Closed
mktange opened this issue Oct 25, 2018 · 12 comments
Closed

Cursor stops blinking after entering vim/tmux #133

mktange opened this issue Oct 25, 2018 · 12 comments

Comments

@mktange
Copy link

mktange commented Oct 25, 2018

Hey. I just installed wsltty and noticed that whenever I enter a program such as vim or tmux, my cursor will stop blinking:

wsltty-cursor-blink

Any idea what could be causing this?

I am only seeing this happen when using wsltty. It works fine when running WSL normally, or even when running WSL via Git Bash's mintty/winpty.

Thanks in advance!

@mintty
Copy link
Owner

mintty commented Oct 26, 2018

Which version of mintty do you run?
Probably duplicate of mintty/mintty#787.

@mktange
Copy link
Author

mktange commented Oct 26, 2018

The one under wsltty is 2.9.3, while the one under Git Bash (which works) is only 2.9.1:

mktange:~$ /mnt/c/Users/mtange/AppData/Local/wsltty/bin/mintty.exe --version
mintty 2.9.3 (x86_64-pc-cygwin) – wsltty 1.9.3
© 2013/2018 Andy Koppe / Thomas Wolff
License GPLv3+: GNU GPL version 3 or later
There is no warranty, to the extent permitted by law.
mktange:~$ /mnt/c/Program\ Files/Git/usr/bin/mintty.exe --version
mintty 2.9.1 (x86_64-pc-msys)
© 2013/2018 Andy Koppe / Thomas Wolff
License GPLv3+: GNU GPL version 3 or later
There is no warranty, to the extent permitted by law.

@mintty
Copy link
Owner

mintty commented Oct 26, 2018

Please check which escape sequences your application uses as configured when starting, or make a terminal log (not screenshot) that includes the effect, so it can be reproduced with cat log.

@mktange
Copy link
Author

mktange commented Oct 26, 2018

Here is a log file of it happening. Doing cat log.txt makes the cursor stop blinking for me.

@mktange
Copy link
Author

mktange commented Oct 26, 2018

Tried doing cat log.txt in Git Bash as well, and it also made the cursor stop blinking. However, now this issue is now also happening when opening vim in Git Bash... not sure what has changed since I last tried it there, besides me restarting my computer.

Just to try something else, I tried opening the terminals in ConEmu, and here it currently still works correctly in Git Bash, but not wsltty. When doing cat log.txt it stops the cursor from blinking in wsltty, while with Git Bash it keeps blinking, but seems to partially mess up the terminal output.

@mintty
Copy link
Owner

mintty commented Oct 26, 2018

The culprit is the CSI escape sequence ESC[?12l which is supported since 2.9.0, following xterm.
It is included in the terminfo "cnorm" sequence to reset the cursor. Somebody probably put it in there on purpose.

@mintty
Copy link
Owner

mintty commented Oct 26, 2018

Actually, behaviour is identical in xterm; this is not a mintty issue, so I'm marking it invalid.
A workaround is already available: include option SuppressDEC=12 in your config file.
Maybe I'll add a specific hint to the wiki, leaving the issue open for now.

@mktange
Copy link
Author

mktange commented Oct 27, 2018

Awesome, that worked. Thank you for the fast troubleshooting and help!

mintty added a commit to mintty/mintty that referenced this issue Oct 31, 2018
download links for F25 Blackletter Typewriter (#734)
@JonnyRa
Copy link

JonnyRa commented Feb 12, 2019

For anyone else who stumbles across this, I think this might be a neovim issue. I used it instead of normal vim to trial floobits recently, environment was gnome-shell + tmux. I lost cursor blink in my whole tmux session accross all panes and windows and restarting tmux had no effect... nvim had told me to muck around with some tmux settings so it took me a while to realise that it was also disabled in the parent terminal. Closing the parent terminal and reopening (+ not using neovim!) resolved the issue for me.

@mintty
Copy link
Owner

mintty commented Feb 15, 2019

It also happens with non-neo vim. With most applications, it's not caused by the appliction itself but the underlying terminal library (often ncurses), as explained above.
Remedy also as explained above, and it's mentioned meanwhile in the wiki, so I'm closing the issue.

@mintty mintty closed this as completed Feb 15, 2019
mintty added a commit to mintty/mintty that referenced this issue Apr 23, 2019
…CUSR) so that DECRST 12 does not spoil blinking style (#818, mintty/wsltty#133)
@mintty
Copy link
Owner

mintty commented Apr 23, 2019

Actually there is one possible workaround that I've now implemented:
Blinking cursor mode (DECSET 12) effectively overlays blinking cursor style (DECSCUSR) so that DECRST 12 does not reset blinking but revert to the previous blinking style.

@mintty
Copy link
Owner

mintty commented May 28, 2019

Released 3.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants