]> Sergey Matveev's repositories - nnn.git/commitdiff
Minor reformat
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 9 Apr 2020 13:43:42 +0000 (19:13 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 9 Apr 2020 13:43:42 +0000 (19:13 +0530)
src/nnn.c

index 8475bbb6c25471150e1dde9a9e1da818632e9739..4d9ed0bde1e1911449980c389a4198b211fb32b7 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4992,7 +4992,7 @@ static void redraw(char *path)
 
        int ncols = (xcols <= PATH_MAX) ? xcols : PATH_MAX;
        int onscreen = xlines - 4;
-       int i;
+       int i, attrs;
        char *ptr = path;
 
        // Fast redraw
@@ -5026,9 +5026,9 @@ static void redraw(char *path)
                if (!g_ctx[i].c_cfg.ctxactive) {
                        addch(i + '1');
                } else {
-                       int attrs = (cfg.curctx != i)
-                                    ? (COLOR_PAIR(i + 1) | A_BOLD | A_UNDERLINE) /* Active */
-                                    : (COLOR_PAIR(i + 1) | A_BOLD | A_REVERSE); /* Current */
+                       attrs = COLOR_PAIR(i + 1) | A_BOLD
+                               /* active: underline, current: reverse */
+                               | ((cfg.curctx != i) ? A_UNDERLINE : A_REVERSE );
                        attron(attrs);
                        addch(i + '1');
                        attroff(attrs);