Merge remote-tracking branch 'Screwtapello/save-restore-window-title'

This commit is contained in:
Maxime Coste 2021-07-07 19:16:07 +10:00
commit 0c92ec8a23

View File

@ -419,6 +419,8 @@ void NCursesUI::set_terminal_mode() const
fputs("\033[?1004h", stdout);
// request CSI u style key reporting
fputs("\033[>4;1m", stdout);
// save the current window title
fputs("\033[22t", stdout);
fflush(stdout);
}
@ -428,6 +430,7 @@ void NCursesUI::restore_terminal_mode() const
fputs("\033>", stdout);
fputs("\033[?1004l", stdout);
fputs("\033[>4;0m", stdout);
fputs("\033[23t", stdout);
fflush(stdout);
}