From 7c48a72e11fe995d470772423c029dd2efa6b193 Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Tue, 15 Jun 2021 12:04:21 +1000 Subject: [PATCH] src: Restore the window title when quitting or suspending Kakoune. Fixes #4228. --- src/ncurses_ui.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ncurses_ui.cc b/src/ncurses_ui.cc index 31c5269a..25e06433 100644 --- a/src/ncurses_ui.cc +++ b/src/ncurses_ui.cc @@ -414,6 +414,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); } @@ -423,6 +425,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); }