From b53cb427a44450041da2772f1b9f49bc2b8b1288 Mon Sep 17 00:00:00 2001
From: yorhel <yorhel@ce56bc8d-f834-0410-b703-f827bd498a76>
Date: Tue, 24 Jul 2007 10:52:13 +0000
Subject: [PATCH] The 'h' key now also hides excluded items

git-svn-id: svn://blicky.net/ncdu/trunk@9 ce56bc8d-f834-0410-b703-f827bd498a76
---
 doc/ncdu.1    | 10 +++++-----
 src/browser.c |  5 ++++-
 src/help.c    |  2 +-
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/doc/ncdu.1 b/doc/ncdu.1
index 4f7836f..f026816 100644
--- a/doc/ncdu.1
+++ b/doc/ncdu.1
@@ -113,11 +113,11 @@ Use powers of 1000 instead of 1024, press again to switch back
 .TP
 .B
 h
-Show/Hide 'hidden' files and directories. Please note that even though
-you can't see the hidden files and directories, they are still there
-and they are still included in the directory sizes. If you suspect that
-the totals shown at the bottom of the screen are not correct, make sure
-you haven't enabled this option.
+Show/hide 'hidden' or 'excluded' files and directories. Please note that
+even though you can't see the hidden files and directories, they are still
+there and they are still included in the directory sizes. If you suspect
+that the totals shown at the bottom of the screen are not correct, make
+sure you haven't enabled this option.
 .TP
 .B
 q
diff --git a/src/browser.c b/src/browser.c
index ee93404..430deb0 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -121,7 +121,10 @@ char *graph(off_t max, off_t size) {
 }
 
 
-#define exlhid(x) if(bflags & BF_HIDE && !(x->flags & FF_PAR) && x->name[0] == '.') { i--; continue; }
+#define exlhid(x) if(bflags & BF_HIDE && (\
+    (!(x->flags & FF_PAR) && x->name[0] == '.')\
+    || x->flags & FF_EXL)\
+  ) { i--; continue; }
 
 void drawBrowser(int change) {
   struct dir *n;
diff --git a/src/help.c b/src/help.c
index 98331f0..a5e9ac7 100644
--- a/src/help.c
+++ b/src/help.c
@@ -63,7 +63,7 @@ void drawHelp(int page) {
       mvwaddstr(hlp, 8, 16, "Toggle dirs before files when sorting");
       mvwaddstr(hlp, 9, 16, "Show percentage and/or graph");
       mvwaddstr(hlp,10, 16, "Toggle between powers of 1000 and 1024");
-      mvwaddstr(hlp,11, 16, "Show/hide hidden files");
+      mvwaddstr(hlp,11, 16, "Show/hide hidden or excluded files");
       mvwaddstr(hlp,12, 16, "Quit ncdu");
       break;
     case 2:
-- 
GitLab