]> Sergey Matveev's repositories - nnn.git/commitdiff
Clear runtime states
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 28 May 2022 18:00:56 +0000 (23:30 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 28 May 2022 18:00:56 +0000 (23:30 +0530)
src/.clang-tidy
src/nnn.c

index 3f0bc4c08dfdea9386a75b04fe3acf13e412fd40..ef188b7b6c60b9097c30ff3353a04e48a215438c 100644 (file)
@@ -11,5 +11,5 @@ CheckOptions:
   - key:             fuchsia-restrict-system-includes.Includes
     value:           '*,-stdint.h,-stdbool.h'
   - key:             readability-function-size.StatementThreshold
-    value:           '905'
+    value:           '910'
 ...
index e9919d270f105c03db1122c56b86e2341405e61a..6b0c1dc5317350d9674f65961e4e6d7ef303adef 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4988,14 +4988,14 @@ static size_t handle_bookmark(const char *bmark, char *newpath)
                bmark ? xstrsncpy(newpath, bmark, PATH_MAX) : (r = MSG_NOT_SET);
        else if (fd == '\r') { /* Visit bookmarks directory */
                mkpath(cfgpath, toks[TOK_BM], newpath);
-               g_state.selbm = TRUE;
+               g_state.selbm = 1;
        } else if (!get_kv_val(bookmark, newpath, fd, maxbm, NNN_BMS))
                r = MSG_INVALID_KEY;
 
        if (!r && chdir(newpath) == -1) {
                r = MSG_ACCESS;
                if (g_state.selbm)
-                       g_state.selbm = FALSE;
+                       g_state.selbm = 0;
        }
 
        return r;
@@ -6905,6 +6905,7 @@ nochange:
                        /* Cannot descend in empty directories */
                        if (!ndents) {
                                cd = FALSE;
+                               g_state.selbm = g_state.runplugin = 0;
                                goto begin;
                        }
 
@@ -6915,7 +6916,7 @@ nochange:
                                S_ISLNK(pent->mode)
                                        ? (realpath(pent->name, newpath) && xstrsncpy(path, lastdir, PATH_MAX))
                                        : mkpath(path, pent->name, newpath);
-                               g_state.selbm = FALSE;
+                               g_state.selbm = 0;
                        } else
                                mkpath(path, pent->name, newpath);
                        DPRINTF_S(newpath);