GNOME Bugzilla – Bug 129940
Editing any file in vi inside Terminal shows file contents as garbled
Last modified: 2007-11-28 12:07:47 UTC
Distribution: Unknown Package: gnome-terminal Severity: major Version: GNOME2.4.0 2.4.x Gnome-Distributor: GARNOME Synopsis: Editing any file in vi inside Terminal shows file contents as garbled Bugzilla-Product: gnome-terminal Bugzilla-Component: general Bugzilla-Version: 2.4.x Description: Description of Problem: If a file is edited in vi within Terminal, the file content is displayed as garbled(all control characters). Pressing CTRL-L clears the display. Steps to reproduce the problem: 1. Start Terminal 2. Open a file in vi within Terminal 3. Actual Results: The file content will be displayed as garbled. Even if the file is empty, a non-printable character is displayed. Expected Results: The file should display its contents properly. How often does this happen? Everytime Additional Information: ------- Bug moved to this database by unknown@bugzilla.gnome.org 2003-12-24 05:31 ------- The original reporter (sauravs@cdotd.ernet.in) of this bug does not have an account here. Reassigning to the exporter, unknown@bugzilla.gnome.org. Reassigning to the default owner of the component, gnome-terminal-maint@bugzilla.gnome.org.
Created attachment 22712 [details] Screenshot of a file opened in vi inside Terminal showing garbled output
Created attachment 22713 [details] Screenshot of the same file opened in vi inside Terminal after CTRL-L is pressed
Has this always been a problem or just with newer versions of vi and/or gnome-terminal?
This is the 2nd time I have been able to compile gnome-terminal for HP-UX. I noticed the problem even then. The vi used is actually vim version 6.1. I use it regularly in gnome terminal 1.4.0.7 in GNOME 1.4 for HP-UX with no problem.
I use vim all the time and I have never seen anything like this. This looks like vim is sending the control sequence 'ESC [ ? 2 5 I', which gnome-terminal (nor the standard xterm, for that matter) recognizes. Can you attach a copy of your xterm termcap? Also, if you have the 'script' program installed: do the following in a gnome-terminal: script gnome-terminal-problem vim empty-file (quit vim without doing anything) exit That should leave a file named gnome-terminal-problem, which contains everything vim sent to the terminal. If you can do that, please attach that file, too.
Since it has been quite some time I posted my comment, I no longer have GNOME installed in my system. So I can't provide the script output you mentioned. I have attached the terminfo file for vt100 (my TERM is set to vt100). I think that's what you are looking for
Created attachment 27588 [details] my vt100 terminfo file (/usr/share/lib/terminfo/v/vt100)
That's a strange terminfo file for a vt100... it differs in 67 entries from mine. In particular, it's 'civis' entry (cursor_invisible) is 'ESC [ ? 2 5 I', which is the control sequence you are seeing, while the vt100 and pretty much every other derivative term uses 'ESC [ ? 2 5 l' for that (all DEC reset control sequences end in 'l'). As far as I can see (by running a tracing xterm) the only reason why using that terminfo file does work on (xfree's, version 179) xterm is that those control sequences are being ignored: this is an except from a trace of vim running with your terminfo file: parse 001B -> 5 parse 005B -> 53 parse 003F -> 18 parse 0032 -> 16 parse 0035 -> 16 parse 0049 -> 0 The 0 at the end essentially means the control sequence has been ignored. Now I don't know if vte should be ignoring it as well... Nalin?
Have you tried any later versions of VTE?
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 403130 ***