After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753645 - Terminals don't always react to cursor changing control sequences
Terminals don't always react to cursor changing control sequences
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.40.x
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-08-15 01:22 UTC by Felipe Morales
Modified: 2015-09-13 13:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix (1005 bytes, patch)
2015-08-15 13:25 UTC, Egmont Koblinger
committed Details | Review

Description Felipe Morales 2015-08-15 01:22:55 UTC
Testing neovim [1], I found the cursor doesn't always react on control sequences that change the cursor (if you've used vim, you'll know it has modes; neovim can change the cursor shape when switching modes using control sequences). I opened a pull request to try and refresh neovim's terminal ui forcefully on cursor changes [2], but when trying to do it less bluntly (by redrawing the cell under the cursor instead of the whole screen), I found it didn't work in some cases under gnome-terminal. I'm assuming this issue lies at the vte library level, although I might be wrong.

We found that this issue wasn't necessarily caused by neovim's handling of control sequences or the terminal libraries it uses, since we could reproduce using this python script:

~~~
#!/usr/bin/env python
import sys
import time

time.sleep(2)
sys.stdout.write('\x1b[5 q')
sys.stdout.flush()
time.sleep(2)
sys.stdout.write('\x1b[2 q')
sys.stdout.flush()
time.sleep(2)
~~~

where the cursor gets changed to the bar (|) first and then gets hidden (while it should be restored as a block).

I'm opening this ticket mostly to see if someone can confirm this and has some idea of what's going on.

[1]: https://github.com/neovim/neovim/
[2]: https://github.com/neovim/neovim/pull/3110
Comment 1 Egmont Koblinger 2015-08-15 13:25:04 UTC
Created attachment 309325 [details] [review]
Fix

Note: for the example to work, you should start with a steady cursor.

The actual problem is that the blink cycle is stuck in its "off" state.

Fix attached.
Comment 2 Felipe Morales 2015-08-15 18:57:03 UTC
Thanks a lot for taking a look, Egmont. I'll update the neovim PR accordingly and just wait for this fix to land.
Comment 3 Egmont Koblinger 2015-08-16 10:34:24 UTC
Fixed
Comment 4 Egmont Koblinger 2015-09-13 13:46:57 UTC
Older VTEs are affected too. They don't support these escape sequences yet, but you can still trigger the bug with

sleep 2; dconf write /org/gnome/desktop/interface/cursor-blink false