diff options
Diffstat (limited to 'src/linux/btop_collect.cpp')
-rw-r--r-- | src/linux/btop_collect.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index cd52200..6154725 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -2797,18 +2797,13 @@ namespace Proc { filter_found = 0; for (auto& p : current_procs) { if (not tree and not filter.empty()) { - if (not s_contains_ic(to_string(p.pid), filter) - and not s_contains_ic(p.name, filter) - and not s_contains_ic(p.cmd, filter) - and not s_contains_ic(p.user, filter)) { - p.filtered = true; - filter_found++; - } - else { - p.filtered = false; - } + if (!matches_filter(p, filter)) { + p.filtered = true; + filter_found++; + } else { + p.filtered = false; } - else { + } else { p.filtered = false; } } |