Hi,
Since 1.9 my status bar hasn't been rendering correctly, and it looks
like there may have been a typo when factoring out style_apply_update
in this commit 945339b443affdaaca260605e15b5a3b9a3c6e16
status.c has a number of changes like this [1]:
- fg = options_get_number(&s->options, "status-left-fg");
- if (fg != 8)
- colour_set_fg(gc, fg);
- bg = options_get_number(&s->options, "status-left-bg");
- if (bg != 8)
- colour_set_bg(gc, bg);
- attr = options_get_number(&s->options, "status-left-attr");
- if (attr != 0)
- gc->attr = attr;
+ style_apply_update(gc, &s->options, "status-left-style");
But style_apply_update() now looks like this [2]:
+ if (gcp->fg != 8)
+ colour_set_fg(gc, gcp->fg);
+ if (gcp->bg != 8)
+ colour_set_bg(gc, gcp->bg);
+ if (gcp->attr != 0)
+ gc->attr |= gcp->attr;
Note the final line where the new attributes are OR'ed in rather than set.
The attached example.config illustrates the problem.
In tmux 1.6/7/8 the status bar has the underscore attribute set, and the
current window has only bright.
In tmux 1.9, the current window has bright, but also underscore.
The attached patch restores the original rendering behaviour.
Steve
(github links because I can't work out how to reference individual lines in the
sourceforge repo)
[1]
https://github.com/ThomasAdam/tmux/commit/945339b443affdaaca260605e15b5a3b9a3c6e16#diff-89572738e5b52c0915a3d496b4d2f613L86
[2]
https://github.com/ThomasAdam/tmux/commit/945339b443affdaaca260605e15b5a3b9a3c6e16#diff-bc9cdc3634a84e5dbe2350b4b180a7b2R211
diff --git a/style.c b/style.c
index 9974408..257d146 100644
--- a/style.c
+++ b/style.c
@@ -234,5 +234,5 @@ style_apply_update(struct grid_cell *gc, struct options
*oo, const char *name)
colour_set_bg(gc, gcp->bg);
}
if (gcp->attr != 0)
- gc->attr |= gcp->attr;
+ gc->attr = gcp->attr;
}
set -g status-attr underscore
set -g window-status-current-attr bright
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users