patches/restorepreview/mainline.diff | 2 +- src/nnn.c | 4 ++-- diff --git a/patches/restorepreview/mainline.diff b/patches/restorepreview/mainline.diff index 50feb42f2f1e7195f7a692eaf4cf81ed1c38c9d1..ecac37de2a24c05491132b65ac51c2b4532ce04b 100644 --- a/patches/restorepreview/mainline.diff +++ b/patches/restorepreview/mainline.diff @@ -202,7 +202,7 @@ goto nochange; case SEL_EDIT: + if (g_state.previewer) + notify_fifo(FALSE, TRUE); - if (!g_state.picker) + if (!(g_state.picker || g_state.fifomode)) spawn(editor, newpath, NULL, NULL, F_CLI); + if (g_state.previewer) { + pkey = previewkey; diff --git a/src/nnn.c b/src/nnn.c index d6fc1cd473a2a5b4b20d415a8b14dde4cf4b5128..78891bc570b522dcea0161e80d5a1ef99250e714 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -354,7 +354,7 @@ uint_t autonext : 1; /* Auto-jump on open */ uint_t dircolor : 1; /* Current status of dir color */ uint_t dirctx : 1; /* Show dirs in context color */ uint_t duinit : 1; /* Initialize disk usage */ - uint_t fifomode : 1; /* FIFO notify mode: 0: preview, 1: explore */ + uint_t fifomode : 1; /* FIFO notify mode: 0: preview, 1: explorer */ uint_t forcequit : 1; /* Do not prompt on quit */ uint_t initfile : 1; /* Positional arg is a file */ uint_t interrupt : 1; /* Program received an interrupt */ @@ -7338,7 +7338,7 @@ presel = FILTER; copycurname(); goto nochange; case SEL_EDIT: - if (!g_state.picker) + if (!(g_state.picker || g_state.fifomode)) spawn(editor, newpath, NULL, NULL, F_CLI); continue; default: /* SEL_LOCK */