src/nnn.c | 22 ++++++++++++++-------- diff --git a/src/nnn.c b/src/nnn.c index 61897858d2673346d1fa88a41871bac153214a69..6e5b21101f347897847575338cd0c4c3bd02b79f 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -5993,9 +5993,11 @@ valid_parent(path, lastname); setdirwatch(); } - /* Set terminal window title */ - printf("\033]2;%s (%s)\007", xbasename(path), path); - fflush(stdout); + if (!g_state.picker) { + /* Set terminal window title */ + printf("\033]2;%s (%s)\007", xbasename(path), path); + fflush(stdout); + } if (g_state.selmode && lastdir[0]) lastappendpos = selbufpos; @@ -7587,8 +7589,10 @@ } static void cleanup(void) { - printf("\033[23;0t"); /* reset terminal window title */ - fflush(stdout); + if (!g_state.picker) { + printf("\033[23;0t"); /* reset terminal window title */ + fflush(stdout); + } free(selpath); free(plgpath); free(cfgpath); @@ -8003,9 +8007,11 @@ read_history(g_buf); } #endif - /* Save terminal window title */ - printf("\033[22;0t"); - fflush(stdout); + if (!g_state.picker) { + /* Save terminal window title */ + printf("\033[22;0t"); + fflush(stdout); + } #ifndef NOMOUSE if (!initcurses(&mask))