After closing an app that uses color formatting (e.g. vim) the terminal retains some properties like background color.
This happens only when using putty-256color or screen term.
I'm observing similar behavior in RHEL 6.5 and Ubuntu 14.04LTS.
The only solution is to reset the terminal.
When using xterm-256color term (also w/ Putty terminal emulator) the problem isn't present.
Is there a solution/explanation why this happens and what could I be loosing when using xterm under Putty terminal emulator, i.e. would it be preferable to actually use putty-256color or xterm-256color term?
A solution to this is to enable
altscreenunder GNU screen. Thus the screen term behaves like regular xterm does - a fullscreen app has a separate frame/screen from the rest of the output.It's important, however to have a correct
TERMset so that the app knows how to switch between the regular and alt-screen.Source: When using vim or less in gnu screen, quitting vim or less leaves a lingering imprint