diff options
| author | 2018-12-02 22:53:07 +0530 | |
|---|---|---|
| committer | 2018-12-02 22:53:07 +0530 | |
| commit | 230664596e1a4af7802ed90661a4b9b49a9fec0d (patch) | |
| tree | 6082beff88667746e4809a7f3a7df10f81f76594 | |
| parent | a6dac8d22b12d761cf08d1c56ae57494543b2d74 (diff) | |
| download | nnn-230664596e1a4af7802ed90661a4b9b49a9fec0d.tar.gz | |
Ask to create new context on TAB
| -rw-r--r-- | src/nnn.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -2832,8 +2832,16 @@ nochange: case '3': // fallthrough case '4': r = fd - '1'; /* Save the next context id */ - if (cfg.curctx == r) - continue; + if (cfg.curctx == r) { + 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 g_crc = 0; @@ -3433,7 +3441,7 @@ nochange: break; } - if (!(r == MAX_CTX || r == 13)) + if (!(r == MAX_CTX || r == '\r')) break; if (sel == SEL_QUITCD) { |