This is the fix if you want to try it, else wait a few days and it
should be in git.

Thanks for the report.

Index: screen-write.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/screen-write.c,v
retrieving revision 1.57
diff -u -p -r1.57 screen-write.c
--- screen-write.c      24 Sep 2012 12:53:55 -0000      1.57
+++ screen-write.c      8 Dec 2012 16:53:05 -0000
@@ -324,6 +324,9 @@ screen_write_parsestyle(
                        fg = defgc->fg;
                        bg = defgc->bg;
                        attr = defgc->attr;
+                       flags &= ~(GRID_FLAG_FG256|GRID_FLAG_BG256);
+                       flags |=
+                           defgc->flags & (GRID_FLAG_FG256|GRID_FLAG_BG256);
                } else if (end > 3 && strncasecmp(tmp + 1, "g=", 2) == 0) {
                        if ((val = colour_fromstring(tmp + 3)) == -1)
                                return;
@@ -335,8 +338,11 @@ screen_write_parsestyle(
                                        } else
                                                flags &= ~GRID_FLAG_FG256;
                                        fg = val;
-                               } else
+                               } else {
                                        fg = defgc->fg;
+                                       flags &= ~GRID_FLAG_FG256;
+                                       flags |= defgc->flags & GRID_FLAG_FG256;
+                               }
                        } else if (*in == 'b' || *in == 'B') {
                                if (val != 8) {
                                        if (val & 0x100) {
@@ -345,8 +351,11 @@ screen_write_parsestyle(
                                        } else
                                                flags &= ~GRID_FLAG_BG256;
                                        bg = val;
-                               } else
+                               } else {
                                        bg = defgc->bg;
+                                       flags &= ~GRID_FLAG_BG256;
+                                       flags |= defgc->flags & GRID_FLAG_BG256;
+                               }
                        } else
                                return;
                } else if (end > 2 && strncasecmp(tmp, "no", 2) == 0) {




On Fri, Dec 07, 2012 at 11:27:29AM -0500, Rob Bruce wrote:
>    I was working away setting up tmux-powerline, and came across a problem
>    where tmux wasn't setting the background back to default, allowing it to
>    be tranparent if I have transparency enabled.
> 
>    Hopped into IRC and asked if anyone else had the same issue, get a reply
>    that it turns out I'm the one who does.
> 
>    Turn off tmux-powerline script, write a short snippit, and it works!
> 
>    *** set status-left #[bg=green]TEST[#bg=default]TEST
> 
>    and I get a transparent background on the second TEST. SUCCESS!
> 
>    "But wait, I tried that before, and it didn't wo--"
> 
>    *** set status-left #[bg=colour89]TEST[#bg=default]TEST
> 
>    "Ah, that's right. Well, not right at all, really."
>    Something with changing from bg=colour{0..255} (and it could be slightly
>    less, I didn't test the ones that are the same as red, green, etc) makes
>    it not work.
> 
>    There's a workaround, though.
> 
>    *** set status-left #[bg=colour89]TEST[#bg=red][#bg=default]TEST
> 
>    works as I expected it to the whole time. Now I've just got to hack apart
>    the tmux-powerline script (or most likely just add my own bit for the last
>    part of it) and I'll be right as rain, but the bug will still be there.

> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d

> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to