summaryrefslogtreecommitdiffstats
path: root/InfoScreen.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2020-11-01 01:09:51 +0100
committerBenny Baumann <BenBE@geshi.org>2020-11-02 22:15:01 +0100
commit45869513bfebba80cc2ab42e4218f68b34b1e6ac (patch)
treef064631dbff141bf1c945db8cff40b7bb82fd169 /InfoScreen.c
parent61e14d4bb25268593019e6df3eb02264b4ac8e0e (diff)
Embracing branches
Diffstat (limited to 'InfoScreen.c')
-rw-r--r--InfoScreen.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/InfoScreen.c b/InfoScreen.c
index 102f0ba7..b7cbd4c6 100644
--- a/InfoScreen.c
+++ b/InfoScreen.c
@@ -64,16 +64,18 @@ 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)) {
Panel_add(this->display, Vector_get(this->lines, Vector_size(this->lines) - 1));
+ }
}
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)) {
Panel_add(this->display, (Object*)last);
+ }
}
void InfoScreen_run(InfoScreen* this) {
@@ -133,7 +135,9 @@ void InfoScreen_run(InfoScreen* this) {
break;
case KEY_F(5):
clear();
- if (As_InfoScreen(this)->scan) InfoScreen_scan(this);
+ if (As_InfoScreen(this)->scan)
+ InfoScreen_scan(this);
+
InfoScreen_draw(this);
break;
case '\014': // Ctrl+L
@@ -149,6 +153,7 @@ void InfoScreen_run(InfoScreen* this) {
Panel_resize(panel, COLS, LINES - 2);
if (As_InfoScreen(this)->scan)
InfoScreen_scan(this);
+
InfoScreen_draw(this);
break;
default:

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