Apply is meant to replace, apply_update to add. So I think the function is
right. More likely the call should be style_apply.
-------- Original message --------
From: Stephen Thirlwall <s...@dr.com>
Date: 01/03/2014 00:28 (GMT+01:00)
To: tmux-users@lists.sourceforge.net
Subject: [PATCH] typo in style_apply_update - fixes attrs in status bar
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
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------
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