Public bug reported:

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/libvte.so.9.9.2]
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: vte
Uname: Linux 2.6.32-rc4 i686
XsessionErrors:
 (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

** Affects: vte
     Importance: Unknown
         Status: Unknown

** Affects: vte (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386

-- 
Don't clear the screen when switching to the alternate screen
https://bugs.launchpad.net/bugs/452940
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to