Ask to create new context on TAB

This commit is contained in:
Arun Prakash Jana 2018-12-02 22:53:07 +05:30
parent a6dac8d22b
commit 230664596e
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -2832,8 +2832,16 @@ nochange:
case '3': // fallthrough case '3': // fallthrough
case '4': case '4':
r = fd - '1'; /* Save the next context id */ r = fd - '1'; /* Save the next context id */
if (cfg.curctx == r) if (cfg.curctx == r) {
continue; if (sel == SEL_CYCLE) {
(r == MAX_CTX - 1) ? (r = 0) : ++r;
snprintf(newpath, PATH_MAX, "Create context %d? ('Enter' confirms)", r + 1);
fd = get_input(newpath);
if (fd != '\r')
continue;
} else
continue;
}
#ifdef DIR_LIMITED_COPY #ifdef DIR_LIMITED_COPY
g_crc = 0; g_crc = 0;
@ -3433,7 +3441,7 @@ nochange:
break; break;
} }
if (!(r == MAX_CTX || r == 13)) if (!(r == MAX_CTX || r == '\r'))
break; break;
if (sel == SEL_QUITCD) { if (sel == SEL_QUITCD) {