Fix #918: picker mode broken

This commit is contained in:
Arun Prakash Jana 2021-03-26 01:14:16 +05:30
parent b0aa1fe379
commit 9c218d41e8
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 14 additions and 8 deletions

View File

@ -5993,9 +5993,11 @@ begin:
setdirwatch(); setdirwatch();
} }
/* Set terminal window title */ if (!g_state.picker) {
printf("\033]2;%s (%s)\007", xbasename(path), path); /* Set terminal window title */
fflush(stdout); printf("\033]2;%s (%s)\007", xbasename(path), path);
fflush(stdout);
}
if (g_state.selmode && lastdir[0]) if (g_state.selmode && lastdir[0])
lastappendpos = selbufpos; lastappendpos = selbufpos;
@ -7587,8 +7589,10 @@ static bool set_tmp_path(void)
static void cleanup(void) static void cleanup(void)
{ {
printf("\033[23;0t"); /* reset terminal window title */ if (!g_state.picker) {
fflush(stdout); printf("\033[23;0t"); /* reset terminal window title */
fflush(stdout);
}
free(selpath); free(selpath);
free(plgpath); free(plgpath);
free(cfgpath); free(cfgpath);
@ -8003,9 +8007,11 @@ int main(int argc, char *argv[])
} }
#endif #endif
/* Save terminal window title */ if (!g_state.picker) {
printf("\033[22;0t"); /* Save terminal window title */
fflush(stdout); printf("\033[22;0t");
fflush(stdout);
}
#ifndef NOMOUSE #ifndef NOMOUSE
if (!initcurses(&mask)) if (!initcurses(&mask))