commit 7233935109482eb69e5d9521f270168db230aa0d
parent f176d81ea04553921252a8e142fdd9bb8053afd5
Author: Mischievous Meerkat <engineerarun@gmail.com>
Date: Thu, 25 Mar 2021 01:07:16 +0530
Merge pull request #915 from leovilok/term-title-clear-stack
Save/load the terminal window title using xterm esc sequences
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/nnn.c b/src/nnn.c
@@ -7587,6 +7587,8 @@ static bool set_tmp_path(void)
static void cleanup(void)
{
+ printf("\033[23;0t"); /* reset terminal window title */
+ fflush(stdout);
free(selpath);
free(plgpath);
free(cfgpath);
@@ -8001,6 +8003,10 @@ int main(int argc, char *argv[])
}
#endif
+ /* Save terminal window title */
+ printf("\033[22;0t");
+ fflush(stdout);
+
#ifndef NOMOUSE
if (!initcurses(&mask))
#else