]> Sergey Matveev's repositories - nnn.git/commitdiff
prefill the prompt when there's a single target
authorNRK <nrk@disroot.org>
Tue, 11 Oct 2022 18:46:17 +0000 (00:46 +0600)
committerNRK <nrk@disroot.org>
Tue, 11 Oct 2022 18:48:33 +0000 (00:48 +0600)
Fixes: #1505 #1282 #1345
src/nnn.c

index 9010351deedba36886d0231ff3bb99e1057f19af..e216b68600d00a5b214561ca706aee407a6fc2c9 100644 (file)
--- 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;