Don't clear the screen when switching to the alternate screen

Bug #452940 reported by Howard Chu
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gnome Virtual Terminal Emulator
vte (Ubuntu)
Ubuntu Desktop Bugs

Bug Description

I filed this bug and a patch upstream already but the patch has been ignored. It's getting pretty annoying having to fix this manually all the time.

The VT100 command sequences CSI ? 47l (switch to primary screen) and CSI ? 47h (switch to alternate screen) are supposed to be non-destructive. Currently libvte always clears the alternate screen when you switch to it, making it useless. I.e., if you just listed some data in the alt screen, flipped back to the primary, and wanted to see the alt screen again you can't because it gets erased.

The most obvious case where this occurs is using vi, more, less, man, or any other curses-based program. The init string switches to the alt screen, and exiting the program returns to the primary screen. I frequently need to flip back to see what I was just looking at, but it's always erased upon flipping.

You can see the bug using the Gnome terminal or the xfce terminal, since they're both built on libvte. You can see the mostly-correct behavior using xterm.

You can use 'echo -ne "\033["' for the CSI sequence. I use these aliases in my .bashrc:

alias xt0='echo -ne "\033[?47l"'
alias xt1='echo -ne "\033[?47h"'

xt0 switches to the primary screen, xt1 switches to the alt screen.

ProblemType: Bug
Architecture: i386
Date: Fri Oct 16 02:54:14 2009
DistroRelease: Ubuntu 9.10
Package: libvte9 1:0.22.2-0ubuntu2 [modified: usr/lib/]
 PATH=(custom, user)
SourcePackage: vte
Uname: Linux 2.6.32-rc4 i686
 (xfce4-mixer-plugin:2543): libxfce4mixer-CRITICAL **: xfce_mixer_get_track: assertion `GST_IS_MIXER (card)' failed
 (polkit-gnome-authentication-agent-1:2567): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

Revision history for this message
Howard Chu (hyc) wrote :
Changed in vte (Ubuntu):
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
Revision history for this message
Sebastien Bacher (seb128) wrote :

upstream had issue with the change and revert the commit

tags: added: patch patch-rejected-upstream
Changed in vte:
importance: Unknown → Medium
status: Unknown → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.