Browse Source

Fix #351: reduce prompt length for new file/dir

master
Arun Prakash Jana 5 years ago
parent
commit
a7d224f1e5
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      src/nnn.c

+ 7
- 2
src/nnn.c View File

@@ -4323,7 +4323,13 @@ nochange:
#endif
break;
case SEL_NEW:
tmp = xreadline(NULL, "name/link suffix [@ for none]: ");
r = get_input("create 'f'(ile) / 'd'(ir) / 's'(ym) / 'h'(ard)?");
if (r == 'f' || r == 'd') {
tmp = xreadline(NULL, "name: ");
} else if (r == 's' || r == 'h') {
tmp = xreadline(NULL, "link suffix [@ for none]: ");
} else
tmp = NULL;
break;
default: /* SEL_RENAME */
tmp = xreadline(dents[cur].name, "");
@@ -4424,7 +4430,6 @@ nochange:
}
} else {
/* Check if it's a dir or file */
r = get_input("create 'f'(ile) / 'd'(ir) / 's'(ym) / 'h'(ard)?");
if (r == 'f') {
r = openat(fd, tmp, O_CREAT, 0666);
close(r);


Loading…
Cancel
Save