How can I make terminal applications immune to terminal emulator close, but still able to use all virtual terminal features?
I want my terminal application remain alive and accessible if I accidentally close terminal emulator. This functionality is provided by screen and tmux, but they have issues with colors and they flush screen. Yes, I can run the shell inside screen, but I do not want the shell remain alive unless there is some other program running.
I see this must be something like screen, but without VT100 terminal emulation, something which will just apply whatever application does with "terminal proxy"'s terminal (like outputting something to stdout/stderr or using stty to set terminal options) to the terminal this proxy runs in.
// I know about
altscreen on, but it makes either this (
or this (
while I want this (
I have figured out that everything looks fine if I compile
USE=-xterm-color (in fact vim looks like on the second picture even without screen if I add this USE flag) and set
TERM=screen-256color, but I do not like this workaround because it actually changes colors and I can't be sure that it will always change them only this way: