]> Sergey Matveev's repositories - nnn.git/commitdiff
Show non matching guid in statusbar (#921)
authorluukvbaal <31730729+luukvbaal@users.noreply.github.com>
Fri, 26 Mar 2021 13:54:54 +0000 (06:54 -0700)
committerGitHub <noreply@github.com>
Fri, 26 Mar 2021 13:54:54 +0000 (19:24 +0530)
src/nnn.c

index 6e5b21101f347897847575338cd0c4c3bd02b79f..f2ed36ee573c1117582951d5b1f56f511ae56107 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5608,7 +5608,7 @@ static bool set_time_type(int *presel)
 static void statusbar(char *path)
 {
        int i = 0, extnlen = 0;
-       char *ptr;
+       char *ptr, guidbuf[5];
        pEntry pent = &pdents[cur];
 
        if (!ndents) {
@@ -5673,14 +5673,18 @@ static void statusbar(char *path)
 
                        if (pw)
                                addstr(pw->pw_name);
-                       else
-                               addch('-');
-                       addch(' ');
+                       else {
+                               sprintf(guidbuf, "%d", pent->uid);
+                               addstr(guidbuf);
+                       }
+                       addch(':');
 
                        if (gr)
                                addstr(gr->gr_name);
-                       else
-                               addch('-');
+                       else {
+                               sprintf(guidbuf, "%d", pent->gid);
+                               addstr(guidbuf);
+                       }
                        addch(' ');
                }
 #endif