Browse Source

Use y/Y for all confirmations

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

+ 6
- 5
src/nnn.c View File

@@ -3227,9 +3227,9 @@ nochange:
if (sel == SEL_CYCLE) { if (sel == SEL_CYCLE) {
(r == CTX_MAX - 1) ? (r = 0) : ++r; (r == CTX_MAX - 1) ? (r = 0) : ++r;
snprintf(newpath, PATH_MAX, snprintf(newpath, PATH_MAX,
"Create context %d? [Enter]", r + 1);
"Create context %d? [y/Y]", r + 1);
fd = get_input(newpath); fd = get_input(newpath);
if (fd != '\r')
if (fd != 'y' && fd != 'Y')
continue; continue;
} else } else
continue; continue;
@@ -3912,7 +3912,8 @@ nochange:


if (tmp && tmp[0]) { if (tmp && tmp[0]) {
spawn(shell, "-c", tmp, path, F_NORMAL | F_SIGINT); spawn(shell, "-c", tmp, path, F_NORMAL | F_SIGINT);
if (!cfg.picker) {
/* The ideal check is !cfg.picker */
if (tmp != g_buf) {
/* readline finishing touches */ /* readline finishing touches */
add_history(tmp); add_history(tmp);
free(tmp); free(tmp);
@@ -3934,11 +3935,11 @@ nochange:
case SEL_QUIT: case SEL_QUIT:
for (r = 0; r < CTX_MAX; ++r) for (r = 0; r < CTX_MAX; ++r)
if (r != cfg.curctx && g_ctx[r].c_cfg.ctxactive) { if (r != cfg.curctx && g_ctx[r].c_cfg.ctxactive) {
r = get_input("Quit all contexts? [Enter]");
r = get_input("Quit all contexts? [y/Y]");
break; break;
} }


if (!(r == CTX_MAX || r == '\r'))
if (!(r == CTX_MAX || r == 'y' || r == 'Y'))
break; break;


if (sel == SEL_QUITCD) { if (sel == SEL_QUITCD) {


Loading…
Cancel
Save