]> Sergey Matveev's repositories - nnn.git/commitdiff
Show selection name in archive option
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 18 Jul 2018 23:14:24 +0000 (04:44 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 18 Jul 2018 23:14:24 +0000 (04:44 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index af1d7b6d9fb0303c9f6a0d5c5671cba7ea7e1a3b..ed5bd670b7d32a9bf35c12d74b78f342201e416a 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -3078,10 +3078,14 @@ nochange:
                                printmsg("quotes off");
                        goto nochange;
                case SEL_OPEN: // fallthrough
-               case SEL_ARCHIVE: // fallthrough
+               case SEL_ARCHIVE:
+                       if (ndents <= 0)
+                               break; // fallthrough
                case SEL_NEW:
                        if (sel == SEL_OPEN)
                                tmp = xreadline(NULL, "open with: ");
+                       else if (sel == SEL_ARCHIVE)
+                               tmp = xreadline(dents[cur].name, "name: ");
                        else
                                tmp = xreadline(NULL, "name: ");