]> Sergey Matveev's repositories - nnn.git/commitdiff
Minor reformat to fix build break
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 17 Apr 2021 15:17:11 +0000 (20:47 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 17 Apr 2021 15:25:37 +0000 (20:55 +0530)
src/nnn.c

index 19e32cfdc4493966efeacbc4a2d077b0d2e507b2..ea408d163ce7997f11bb36495adcb2df0cb8f097 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5328,6 +5328,19 @@ static void handle_screen_move(enum action sel)
        }
 }
 
+static void handle_openwith(const char *path, const char *name, char *newpath, char *tmp)
+{
+       /* Confirm if app is CLI or GUI */
+       int r = get_input(messages[MSG_CLI_MODE]);
+
+       r = (r == 'c' ? F_CLI :
+            (r == 'g' ? F_NOWAIT | F_NOTRACE | F_MULTI : 0));
+       if (r) {
+               mkpath(path, name, newpath);
+               spawn(tmp, newpath, NULL, r);
+       }
+}
+
 static void copynextname(char *lastname)
 {
        if (cur) {
@@ -6835,14 +6848,7 @@ nochange:
                                }
                                continue;
                        case SEL_OPENWITH:
-                               /* Confirm if app is CLI or GUI */
-                               r = get_input(messages[MSG_CLI_MODE]);
-                               r = (r == 'c' ? F_CLI :
-                                    (r == 'g' ? F_NOWAIT | F_NOTRACE | F_MULTI : 0));
-                               if (r) {
-                                       mkpath(path, pdents[cur].name, newpath);
-                                       spawn(tmp, newpath, NULL, r);
-                               }
+                               handle_openwith(path, pdents[cur].name, newpath, tmp);
 
                                cfg.filtermode ?  presel = FILTER : statusbar(path);
                                copycurname();