--- ray/src/util/util.tcl 1994/10/30 08:33:02 2.2 +++ ray/src/util/util.tcl 2003/02/22 02:07:30 2.4 @@ -1,4 +1,4 @@ -# SCCSid "$SunId$ LBL" +# RCSid: $Id: util.tcl,v 2.4 2003/02/22 02:07:30 greg Exp $ # # General utility routines # @@ -10,7 +10,12 @@ proc beep {} { # ring the bell proc view_txt fn { # view a text file global env if [info exists env(EDITOR)] { - eval exec xterm -e $env(EDITOR) $fn + if {[lsearch -exact {vi vedit view ex edit ed red} \ + [file tail [lindex $env(EDITOR) 0]]] >= 0} { + eval exec xterm +sb -e $env(EDITOR) $fn + } else { + eval exec $env(EDITOR) $fn + } } else { foreach f $fn { exec xedit $f