diff options
Diffstat (limited to 'src/freebsd')
-rw-r--r-- | src/freebsd/btop_collect.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/freebsd/btop_collect.cpp b/src/freebsd/btop_collect.cpp index a99f8df..b4034c7 100644 --- a/src/freebsd/btop_collect.cpp +++ b/src/freebsd/btop_collect.cpp @@ -1239,18 +1239,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; } } |