@@ -744,9 +744,13 @@ static Htop_Reaction actionHelp(State* st) {
744744 addbartext (CRT_colors [MEMORY_USED ], "" , "used" );
745745 addbartext (CRT_colors [MEMORY_SHARED ], "/" , "shared" );
746746 addbartext (CRT_colors [MEMORY_COMPRESSED ], "/" , "compressed" );
747- addbartext (CRT_colors [MEMORY_BUFFERS_TEXT ], "/" , "buffers" );
748- addbartext (CRT_colors [MEMORY_CACHE ], "/" , "cache" );
749- addbartext (CRT_colors [BAR_SHADOW ], " " , "used" );
747+ if (st -> host -> settings -> showCachedMemory ) {
748+ addbartext (CRT_colors [MEMORY_BUFFERS_TEXT ], "/" , "buffers" );
749+ addbartext (CRT_colors [MEMORY_CACHE ], "/" , "cache" );
750+ addbartext (CRT_colors [BAR_SHADOW ], " " , "used" );
751+ } else {
752+ addbartext (CRT_colors [BAR_SHADOW ], " " , "used" );
753+ }
750754 addbartext (CRT_colors [BAR_SHADOW ], "/" , "total" );
751755 addattrstr (CRT_colors [BAR_BORDER ], "]" );
752756
@@ -758,7 +762,7 @@ static Htop_Reaction actionHelp(State* st) {
758762 addbartext (CRT_colors [SWAP_CACHE ], "/" , "cache" );
759763 addbartext (CRT_colors [SWAP_FRONTSWAP ], "/" , "frontswap" );
760764#else
761- addbartext (CRT_colors [SWAP_CACHE ], " " , "" );
765+ addbartext (CRT_colors [BAR_SHADOW ], " " , "" );
762766#endif
763767 addbartext (CRT_colors [BAR_SHADOW ], " " , "used" );
764768 addbartext (CRT_colors [BAR_SHADOW ], "/" , "total" );
0 commit comments