GNOME Bugzilla – Bug 170032
gnome-terminal has problems with ANSI (save and restore cursor position)
Last modified: 2006-01-14 13:11:09 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:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=150936
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.
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.
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?
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 ?
*** Bug 316520 has been marked as a duplicate of this bug. ***
Hmm.. shouldn't be in NEEDINFO
Created attachment 56785 [details] [review] Patch from debian/ubuntu
kmaraas ok'ed to commit this. Had to make slight changes as it didn't apply.