Emit an OSC 104 on quit to reset color palette on supporting terminals
xterm and vte based terminals support it, unfortunately rxvt-unicode does not yet. Fixes #914
This commit is contained in:
parent
8e5f491d3f
commit
6889494869
|
@ -261,6 +261,11 @@ NCursesUI::NCursesUI()
|
||||||
NCursesUI::~NCursesUI()
|
NCursesUI::~NCursesUI()
|
||||||
{
|
{
|
||||||
enable_mouse(false);
|
enable_mouse(false);
|
||||||
|
if (can_change_color()) // try to reset palette
|
||||||
|
{
|
||||||
|
fputs("\033]104;\007", stdout);
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
endwin();
|
endwin();
|
||||||
set_signal_handler(SIGWINCH, SIG_DFL);
|
set_signal_handler(SIGWINCH, SIG_DFL);
|
||||||
set_signal_handler(SIGCONT, SIG_DFL);
|
set_signal_handler(SIGCONT, SIG_DFL);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user