nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 8a1a5db92ad0b022df129f280be84f615cdfd5a9
parent 7477bd15bb5106281c27aa5449884368bc3d97af
Author: NRK <nrk@disroot.org>
Date:   Thu, 12 Aug 2021 11:17:48 +0600

Disable e on picker mode

Mainly so that pressing 'e' due to muscle memory on nnn.vim doesn't nest
a new editor instance inside the embedded vim terminal.

However invoking nnn with picker mode implies that the intention is to
pick file(s), there shouldn't be any business trying to edit things on
the fly. And if editing a file while in picker mode is desirable, then
'l' can be used for that instead.

Diffstat:
Msrc/nnn.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -7206,7 +7206,8 @@ nochange: copycurname(); goto nochange; case SEL_EDIT: - spawn(editor, newpath, NULL, NULL, F_CLI); + if (!g_state.picker) + spawn(editor, newpath, NULL, NULL, F_CLI); continue; default: /* SEL_LOCK */ lock_terminal();