From 1a6d54515bec2b7cd28d4eb88ea7aa40c55700a7 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Tue, 23 Nov 2021 13:11:42 +0100 Subject: [PATCH] Guard open_with getreadline with for picker fix luukvbaal/nnn.nvim#25 --- src/nnn.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/nnn.c b/src/nnn.c index 6bc1d5e5..f8ab2d52 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -7519,10 +7519,13 @@ nochange: tmp = xreadline(tmp, messages[MSG_ARCHIVE_NAME]); break; case SEL_OPENWITH: -#ifdef NORL - tmp = xreadline(NULL, messages[MSG_OPEN_WITH]); -#else - tmp = getreadline(messages[MSG_OPEN_WITH]); +#ifndef NORL + if (g_state.picker) { +#endif + tmp = xreadline(NULL, messages[MSG_OPEN_WITH]); +#ifndef NORL + } else + tmp = getreadline(messages[MSG_OPEN_WITH]); #endif break; case SEL_NEW: