From: NRK Date: Tue, 11 Oct 2022 18:46:17 +0000 (+0600) Subject: prefill the prompt when there's a single target X-Git-Tag: v4.7~7^2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=e5074ebc837dd0ca8b3e504227e8c2fc6173460b;p=nnn.git prefill the prompt when there's a single target Fixes: #1505 #1282 #1345 --- diff --git a/src/nnn.c b/src/nnn.c index 9010351d..e216b686 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -7538,7 +7538,7 @@ nochange: if (r == 'f' || r == 'd') tmp = xreadline(NULL, messages[MSG_NEW_PATH]); else if (r == 's' || r == 'h') - tmp = xreadline(NULL, + tmp = xreadline(nselected == 1 ? xbasename(pselbuf) : NULL, messages[nselected <= 1?MSG_NEW_PATH:MSG_LINK_PREFIX]); else tmp = NULL;