diff --git a/tools/preview.rb b/tools/preview.rb index 387dc081b..8bcf88b1c 100755 --- a/tools/preview.rb +++ b/tools/preview.rb @@ -24,7 +24,11 @@ history = [] until files.empty? file = files.shift - print "[#{File.basename file, '.*'}] " if preview + if preview + puts `tput cup 0 0` # goto top of screen + print "[#{File.basename file, '.*'}] " + puts `tput el` # clear to eol + end begin colors = {} root = REXML::Document.new(File.read file).root