GNOME Bugzilla – Bug 709930
man page bg color messed up just after exiting vim
Last modified: 2014-07-26 13:37:33 UTC
This happens after exiting Vim when it uses some colors with index greater than 15. For example, run Vim (making sure it recognizes the 256-color capabilities), set a non-default colorscheme (solarized, maybe). Now, exit Vim and run `man ls`. You will notice that some text still has the background from Vim's colorscheme. If you rerun `man ls` the problem disappears. Looks like the bug is related to ncurses commands: Vim followed by man's pager (less?). But not sure if the bug is strictly within ncurses or within libvte.
Created attachment 257383 [details] [review] Fix This fixes it. Not sure whether the default attributes should only be restored when enterig the alternate screen, or also when leaving it (should check xterm).
Did you find out what xterm does? Pushed to patch to vte-0-36.
Christian, I can confirm that on xterm (297) there's no problem. Also, I should point out that this affects vte-2.90... Thanks for your time.
Comment 3 asked about the answer to the question in comment 2, not for confirmation of the original issue in comment 0.
Entering/leaving alt screen shouldn't change the colors. It's the cursor save/restore (also included in OSC 1049) that restores the color. Continuing the work in bug 731205, closing this one.