diff --git a/src/nnn.c b/src/nnn.c index 43fd107a..b4154360 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -5279,7 +5279,8 @@ nochange: if (cur && access(newpath, F_OK) == -1) { move_cursor(cur - 1, 0); copycurname(); - } + } else + lastname[0] = '\0'; if (cfg.filtermode) presel = FILTER;