diff options
author | Øystein Hiåsen <oystein.hiaasen@gmail.com> | 2021-02-15 20:32:01 +0100 |
---|---|---|
committer | Øystein Hiåsen <oystein.hiaasen@gmail.com> | 2021-02-15 20:44:34 +0100 |
commit | d8d83031d9d42d64e89388c842056031c6dad27c (patch) | |
tree | b074a10be6c200051ab638f019becb18322843eb /InfoScreen.c | |
parent | 1e57cab605d63fb7e0842836cac3fdcaaf42669c (diff) |
InfoScreen: Remove old lines before scanning again
Diffstat (limited to 'InfoScreen.c')
-rw-r--r-- | InfoScreen.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/InfoScreen.c b/InfoScreen.c index 5c5bcf39..80e04837 100644 --- a/InfoScreen.c +++ b/InfoScreen.c @@ -145,8 +145,10 @@ void InfoScreen_run(InfoScreen* this) { break; case KEY_F(5): clear(); - if (As_InfoScreen(this)->scan) + if (As_InfoScreen(this)->scan) { + Vector_prune(this->lines); InfoScreen_scan(this); + } InfoScreen_draw(this); break; @@ -161,8 +163,10 @@ void InfoScreen_run(InfoScreen* this) { break; case KEY_RESIZE: Panel_resize(panel, COLS, LINES - 2); - if (As_InfoScreen(this)->scan) + if (As_InfoScreen(this)->scan) { + Vector_prune(this->lines); InfoScreen_scan(this); + } InfoScreen_draw(this); break; |