nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 9c218d41e8d75c43516b51379c1dd4564378b045
parent b0aa1fe379bb07e590ccbd84c19e018b4218acb9
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri, 26 Mar 2021 01:14:16 +0530

Fix #918: picker mode broken

Diffstat:
Msrc/nnn.c | 22++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -5993,9 +5993,11 @@ begin: 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 bool set_tmp_path(void) 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 @@ int main(int argc, char *argv[]) } #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))