Bug 187192 - VIM editor leaves remnants on scroll with :set noruler on Gnome Terminal
Summary: VIM editor leaves remnants on scroll with :set noruler on Gnome Terminal
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: vte
Version: 5
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-29 03:02 UTC by Khoa Ton
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-10 18:55:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Khoa Ton 2006-03-29 03:02:19 UTC
Description of problem:
Text remnants of long lines remain using vim with :set noruler
only on Gnome Terminal.  Does not occur with xterm or text
console window.

Version-Release number of selected component (if applicable):
[khoa@nile ~]$ gnome-terminal --version
Gnome gnome-terminal 2.14.0
[khoa@nile ~]$ /usr/bin/vim --version
VIM - Vi IMproved 6.4 (2005 Oct 15, compiled Mar  9 2006 09:43:24)
Included patches: 2-7
Modified by <bugzilla>
Compiled by <bugzilla>
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset
+cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info
+comments
+cryptv +cscope +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags
+eval
+ex_extra +extra_search +farsi +file_in_path +find_in_path +folding
-footer
+fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap
+langmap
 +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession
+modify_fname +mouse -mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm
+mouse_netterm +mouse_xterm +multi_byte +multi_lang -netbeans_intg
-osfiletype
+path_extra +perl +postscript +printer +python +quickfix +rightleft
-ruby
+scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax
+tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse
+textobjects +title -toolbar +user_commands +vertsplit +virtualedit
+visual
+visualextra +viminfo +vreplace +wildignore +wildmenu +windows
+writebackup
-X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: i386-redhat-linux-gcc -c -I. -Iproto -DHAVE_CONFIG_H
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386
-mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2   -D_REENTRANT -D_GNU_SOURCE
-pipe -Wdeclaration-after-statement -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm
-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE
-I/usr/include/python2.4 -pthread
Linking: i386-redhat-linux-gcc   -Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE
-L/usr/local/lib -o vim       -lncurses -lselinux  -lacl -lgpm  -Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE
-L/usr/local/lib
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/DynaLoader/DynaLoader.a
-L/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE -lperl -lresolv -lutil -lc
-L/usr/lib/python2.4/config -lpython2.4 -lutil -lm -Xlinker -export-dynamic

How reproducible:
Always

Steps to Reproduce:
1. Log into Gnome Desktop as normal user, open Gnome Terminal.

2. Text remnants on last line is seen in Gnome Terminal running:
        [khoa@nile ~] /bin/vi /etc/passwd
        [khoa@nile ~] /bin/vi -U NONE -u NONE /etc/passwd 
        [khoa@nile ~] /usr/bin/vim -U NONE -u NONE /etc/passwd 
(or any large text file), then scroll downwards.  The problem is
that when scrolling down, the last line displays let's say line 30,
then line 31, then line 32, etc...  If line 30 has more text than
line 31 and 32, parts of line 30 remains on the last line when the
last line is displaying line 32.
  
Actual results:
Text remain on last line of vim, corrupting display.

Expected results:
No spurious text on last line of vim.

Additional info:
Seems that vim does something with respect to screen redraw that
doesn't work properly with Gnome Terminal 2.14.0, and that
this is masked by the :set ruler feature.  Drawing the ruler
 with vim's :set ruler eliminates this remnants on scrolling problem.

Comment 1 Khoa Ton 2006-03-29 05:28:52 UTC
This problem is affecting users of /bin/vi (namely root user)
since /bin/vi is /usr/bin/vim without potential security issues,
and specifically without ability to turn ":set ruler" on.
Workaround is for the root user to use /usr/bin/vim and ":set ruler",
negating the security features of /bin/vi, if Gnome Terminal is used.

Comment 2 Khoa Ton 2006-04-05 02:30:01 UTC
I tried the following:
	# TERM=gnome /bin/vi /etc/passwd
and the problem of text remnants on scroll still existed.
However, the following setting:
	# TERM=ansi /bin/vi /etc/passwd
eliminated the text remnants on scroll problem!

So, based on this last piece of information:

1) Gnome Teminal does seem to be exhibiting bug on redraw, since
   even setting TERM=gnome exhibited this issue with vim.
2) The workaround to use /bin/vi (secure version of /usr/bin/vim)
   as root would be something like:
	# alias vi="vi -T ansi"
   This would be safer than aliasing root's vi to /usr/bin/vim to
   bypass the redraw problem.

Comment 3 Neil Bird 2006-04-05 08:42:49 UTC
Might this then be an issue with the gnome-terminal termcap entries?

Does running TERM=gnome from within an xterm exhibit the problem?  What about
TERM=xterm within gnome-terminal?

[wrt. your above tests, were they both run under gnome-terminal?]


Comment 4 Khoa Ton 2006-04-05 22:45:32 UTC
(In reply to comment #3)
> Might this then be an issue with the gnome-terminal termcap entries?
> 
> Does running TERM=gnome from within an xterm exhibit the problem?  What about
> TERM=xterm within gnome-terminal?
> 
> [wrt. your above tests, were they both run under gnome-terminal?]

Yes, all above tests were done within Gnome Terminal 2.14.0 unless specifically
stated otherwise.

Following are the tests as per your request:

Command: TERM=$TERM /usr/bin/vim -U NONE -u NONE /etc/passwd
    and: /usr/bin/vim -T $TERM -U NONE -u NONE /etc/passwd

             Terminal program tested
             Gnome Terminal   xterm
TERM=ansi         good         good
TERM=gnome        BUG          good
TERM=xterm        BUG          good

Doesn't look like an issue with termcap entries.


Comment 5 Ron Yorston 2006-05-05 18:01:21 UTC
The recent update to vte (vte-0.12.1-1.fc5.1) seems to have fixed this.

Comment 6 Khoa Ton 2006-05-06 01:19:07 UTC
Updated to vte-0.12.1-1.fc5.1 as suggested and the problem went away after a
reboot (maybe just restarting Gnome would have been sufficient).  I'll leave
this bug request as NEW since I don't know the protocol for closing/duplicate,
etc...
Seems like this bug should be filed under VTE and closed?

Thanks Ron!


Comment 7 Ray Strode [halfline] 2006-05-10 18:55:03 UTC
Thanks guys, closing.


Note You need to log in before you can comment on or make changes to this bug.