From: Arun Prakash Jana Date: Sat, 5 Aug 2023 18:23:01 +0000 (+0530) Subject: Fix #1704 - Show only selected file name if sel is preferred X-Git-Tag: v4.9~5 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=693ba757c0ed2a644aa49e9e993132e407124155;p=nnn.git Fix #1704 - Show only selected file name if sel is preferred --- diff --git a/src/nnn.c b/src/nnn.c index f1a2ee74..5af2b1b7 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -7704,7 +7704,7 @@ nochange: if (r == 'f' || r == 'd') tmp = xreadline(tmp, messages[MSG_NEW_PATH]); else if (r == 's' || r == 'h') - tmp = xreadline(NULL, + tmp = xreadline((nselected == 1 && cfg.prefersel) ? xbasename(pselbuf) : NULL, messages[nselected <= 1 ? MSG_NEW_PATH : MSG_LINK_PREFIX]); else tmp = NULL;