summaryrefslogtreecommitdiffstats
path: root/InfoScreen.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2022-03-25 16:24:24 +0100
committerDaniel Lange <DLange@git.local>2022-03-25 17:19:59 +0100
commit7c43e02591de9b6e14744e3eaffed25ad092756e (patch)
tree31434fb6a9d4f658c1812d9298a4424cab34ffb9 /InfoScreen.c
parenta2ca7583a9ba2e57eb9e9316aad52c9248aae092 (diff)
Improve String_contains_i to allow for multiple terms
This enables: * Multiple filters in the main panel and strace etc. views * Multiple search terms The search terms are separated by "|" and are still fixed strings matched case-insensitive. Added a multi flag at request of BenBE.
Diffstat (limited to 'InfoScreen.c')
-rw-r--r--InfoScreen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/InfoScreen.c b/InfoScreen.c
index eea09aa2..105d9c34 100644
--- a/InfoScreen.c
+++ b/InfoScreen.c
@@ -63,7 +63,7 @@ void InfoScreen_drawTitled(InfoScreen* this, const char* fmt, ...) {
void InfoScreen_addLine(InfoScreen* this, const char* line) {
Vector_add(this->lines, (Object*) ListItem_new(line, 0));
const char* incFilter = IncSet_filter(this->inc);
- if (!incFilter || String_contains_i(line, incFilter)) {
+ if (!incFilter || String_contains_i(line, incFilter, true)) {
Panel_add(this->display, Vector_get(this->lines, Vector_size(this->lines) - 1));
}
}
@@ -72,7 +72,7 @@ void InfoScreen_appendLine(InfoScreen* this, const char* line) {
ListItem* last = (ListItem*)Vector_get(this->lines, Vector_size(this->lines) - 1);
ListItem_append(last, line);
const char* incFilter = IncSet_filter(this->inc);
- if (incFilter && Panel_get(this->display, Panel_size(this->display) - 1) != (Object*)last && String_contains_i(line, incFilter)) {
+ if (incFilter && Panel_get(this->display, Panel_size(this->display) - 1) != (Object*)last && String_contains_i(line, incFilter, true)) {
Panel_add(this->display, (Object*)last);
}
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy