diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-11-21 00:56:55 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-11-21 00:56:55 +0530 |
commit | 7d70a655e6eed56c163d352c3d3c4d90d0063285 (patch) | |
tree | 25ac5006be8c5e2dc84592109fba07a978d5a5a6 | |
parent | 2d91768d88b14568139b51da4ce0c85cbe837df5 (diff) | |
download | nnn-7d70a655e6eed56c163d352c3d3c4d90d0063285.tar.gz |
Fix picker mode
-rw-r--r-- | src/nnn.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -4705,7 +4705,7 @@ nochange: } /* move cursor to the next entry if this is not the last entry */ - if (cur != ndents - 1) + if (!cfg.picker && cur != ndents - 1) move_cursor((cur + 1) % ndents, 0); break; case SEL_SELMUL: @@ -5206,8 +5206,7 @@ nochange: /* In vim picker mode, clear selection and exit */ if (cfg.picker) { /* Picker mode: reset buffer or clear file */ - if (selbufpos) - cfg.pickraw ? selbufpos = 0 : writesel(NULL, 0); + selbufpos = 0; } else if (!write_lastdir(path)) { presel = MSGWAIT; goto nochange; @@ -5715,6 +5714,9 @@ int main(int argc, char *argv[]) if (opt != (int)(selbufpos)) xerror(); } + } else if (cfg.picker) { + if (selbufpos) + writesel(pselbuf, selbufpos - 1); } else if (!cfg.picker && g_selpath) unlink(g_selpath); |