commit 88d69d7afc2b4332956e51cc7873e42376016f74
parent d8fd1437f9517b2d0a87d919d01cf4fe4e732315
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 24 Jul 2020 13:01:01 +0200
code-style in draw() move statusbar update near draw
No functional change intended.
Diffstat:
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -1363,15 +1363,6 @@ draw(void)
win.dirty = 0;
}
- /* if item selection text changed, update the status text */
- if (panes[PaneItems].nrows &&
- (row = pane_row_get(&panes[PaneItems], panes[PaneItems].pos))) {
- item = (struct item *)row->data;
- statusbar_update(&statusbar, item->fields[FieldLink]);
- } else {
- statusbar_update(&statusbar, "");
- }
-
/* NOTE: theres the same amount and indices of panes and scrollbars. */
for (i = 0; i < LEN(panes); i++) {
pane_setfocus(&panes[i], i == selpane);
@@ -1383,7 +1374,17 @@ draw(void)
panes[i].nrows, panes[i].height);
scrollbar_draw(&scrollbars[i]);
}
+
+ /* if item selection text changed, update the status text */
+ if (panes[PaneItems].nrows &&
+ (row = pane_row_get(&panes[PaneItems], panes[PaneItems].pos))) {
+ item = (struct item *)row->data;
+ statusbar_update(&statusbar, item->fields[FieldLink]);
+ } else {
+ statusbar_update(&statusbar, "");
+ }
statusbar_draw(&statusbar);
+
fflush(stdout);
}