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 170032 - gnome-terminal has problems with ANSI (save and restore cursor position)
gnome-terminal has problems with ANSI (save and restore cursor position)
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.11.x
Other All
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
: 316520 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-03-12 06:13 UTC by Dag Wieers
Modified: 2006-01-14 13:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Patch from debian/ubuntu (413 bytes, patch)
2006-01-04 18:41 UTC, Olav Vitters
committed Details | Review

Description Dag Wieers 2005-03-12 06:13:18 UTC
Please describe the problem:
The following should work:

    [dag@emyn dag]$ echo -e "\033[sone\033[utwo\033[uthree"
    three

In gnome-terminal, you get this:

    [dag@emyn dag]$ echo -e "\033[sone\033[utwo\033[uthree"
    [sone[utwo[uthree

Regardless of what TERM is used. (gnome, xterm, rxvt, ansi)

    \033[s     -> save cursor position
    \033[u     -> restore cursor position

Other terminal emulation programs, like xterm, rxvt,
multi-gnome-terminal do it correctly. I hit this problem when using dstat.



Steps to reproduce:
1. echo -e "\033[sone\033[utwo\033[uthree"
2. 
3. 


Actual results:
[sone[utwo[uthree

Expected results:
three

Does this happen every time?
Yes

Other information:
Comment 2 Olav Vitters 2005-03-12 16:49:19 UTC
Terminal widget is vte. Moving. The vte maintainer is MIA, so this will take a
while.

What was wrong with my suggestion (I used a form on your website a while ago) to
use:
\0337 for save, and
\0338 for restore?

That works in xterm and gnome-terminal. Don't know about others.
Comment 3 Dag Wieers 2005-03-12 22:41:04 UTC
This is unfortunate, I did not see your mail even though when I look for it now,
it's there :( \0337 and \0338 definitely work on all terminal emulation programs.

I've fixed it now and will issue an update asap. My apologies for missing your
email, I need a better mail client for some time now but none of the existing
ones can do what I need :|

Thanks for your help.
Comment 4 Michele Baldessari 2005-06-09 20:21:41 UTC
Hi Dag,

I actually can't reproduce this (I'm using vte-0.11.13):
michele@naco:~~$ echo -e "\033[sone\033[utwo\033[uthree"
three

dstat too works fine here.

What vte version was this?
Comment 5 Dag Wieers 2005-06-10 03:44:43 UTC
This is VTE version: vte-0.11.13-1.fc3

I still have this problem with eg. gnome-terminal:

[dag@emyn ~]$ echo -e "\033[sone\033[utwo\033[uthree"
[sone[utwo[uthree

I have it too with:

[dag@emyn ~]$ echo -e "^[[sone^[[utwo^[[uthree"
[sone[utwo[uthree

and if I use \0337 and \0338 somehow the cursor ends up at 0,0 and writes three
there.

dstat has long been fixed to not use \033[u and \033[s so dstat works for me too
now in gnome-terminal, but there still is some issue.

Could it be a unicode issue ?
Comment 6 Olav Vitters 2005-09-16 21:21:34 UTC
*** Bug 316520 has been marked as a duplicate of this bug. ***
Comment 7 Olav Vitters 2006-01-04 18:39:39 UTC
Hmm.. shouldn't be in NEEDINFO
Comment 8 Olav Vitters 2006-01-04 18:41:58 UTC
Created attachment 56785 [details] [review]
Patch from debian/ubuntu
Comment 9 Olav Vitters 2006-01-14 13:10:57 UTC
kmaraas ok'ed to commit this. Had to make slight changes as it didn't apply.