Merge pull request #915 from leovilok/term-title-clear-stack

Save/load the terminal window title using xterm esc sequences
This commit is contained in:
Mischievous Meerkat 2021-03-25 01:07:16 +05:30 committed by GitHub
commit 7233935109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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