On Tue, 2006-03-28 at 09:05 +0100, Neil Bird wrote: > Around about 28/03/06 04:28, Khoa Ton typed ... > > That being the case /bin/vi is the more appropriate editor to use as root. > > Any hints as to how to workaround the text remnant problem with /bin/vi > > as root on Gnome Terminal? > > OK, firstly which versions of gnome-terminal and vim? > > Does this fail only for root, or is it for all users? > > Please try: > > vi -U NONE -u NONE thefileinquestion > > .. and see if it still occurs. This runs vim with no config. files which, > if it works, might indicate a funny setting somewhere as opposed to a code bug. > > > FWIW, it doesn't fail for me as a normal user on FC3 with vim 6.4. >From your leads, I've narrowed the problem down the whether or not :set ruler is enabled. Problem reproduction: Log into Gnome Desktop as normal user, open Gnome Terminal. Text remnants on last line is seen for BOTH root AND normal user 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. Problem never occurs when run in text console window (ALT-F1) or xterm. The command: [khoa@nile ~] /usr/bin/vim /etc/passwd does NOT exhibit this problem, UNTIL :set noruler is entered while editing the file. With :set noruler, the problem shows up. 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 eliminates this remnants on scrolling problem. The issue with root or normal user was an unfortunate coincidence, and has no direct bearing on the problem except that root normally calls /bin/vi, which always has :set noruler. This happens on a brand new Fedora FC5 installation, with latest yum update as of 3/28/06. Thanks Khoa Ton ------------- Included Version Information [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@xxxxxxxxxx> Compiled by <bugzilla@xxxxxxxxxx> 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 [khoa@nile ~]$ /bin/vi --version VIM - Vi IMproved 6.4 (2005 Oct 15, compiled Mar 9 2006 09:44:11) Included patches: 2-7 Compiled by <bugzilla@xxxxxxxxxx> Tiny 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 -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 -mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_xterm +multi_byte -multi_lang -netbeans_intg -osfiletype -path_extra -perl -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 -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 Linking: i386-redhat-linux-gcc -L/usr/local/lib -o vim -lselinux -ltermcap -lacl