]> Sergey Matveev's repositories - nnn.git/commitdiff
Guard open_with getreadline with for picker
authorLuuk van Baal <luukvbaal@gmail.com>
Tue, 23 Nov 2021 12:11:42 +0000 (13:11 +0100)
committerLuuk van Baal <luukvbaal@gmail.com>
Tue, 23 Nov 2021 12:11:42 +0000 (13:11 +0100)
fix luukvbaal/nnn.nvim#25

src/nnn.c

index 6bc1d5e5f5a2f860d5e0fad5638069447815b7eb..f8ab2d52f8c3bbc931dfc012ec30cf08d869b0dc 100644 (file)
--- 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: