Re: patch for setting pane background color

2015-02-14 Thread Nicholas Marriott
On Sat, Feb 14, 2015 at 03:50:11PM -0600, J Raynor wrote: > > - I don't think you need to allocate the gc with malloc, just put it > > inside the wp directly and initialize it to grid_default_cell. > > I do need to allocate it with malloc. If I don't, it's always there > (not NULL), so it'll al

Re: patch for setting pane background color

2015-02-14 Thread J Raynor
> - I don't think you need to allocate the gc with malloc, just put it > inside the wp directly and initialize it to grid_default_cell. I do need to allocate it with malloc. If I don't, it's always there (not NULL), so it'll always have some value. That makes it impossible to tell what to do w

[tmux:tickets] #177 if-shell breaks config file parsing

2015-02-14 Thread squirrelpimp
--- ** [tickets:#177] if-shell breaks config file parsing** **Status:** open **Created:** Fri Feb 13, 2015 09:44 AM UTC by squirrelpimp **Last Updated:** Fri Feb 13, 2015 09:44 AM UTC **Owner:** nobody Using even a nop-like version of if-shell seems to break parsing of the rest of the config

Re: patch for setting pane background color

2015-02-14 Thread Nicholas Marriott
Almost all of the tty_reset will need to become tty_attributes for BCE anyway so probably best to see where you are after that before worrying too much about this anyway... On Sat, Feb 14, 2015 at 09:36:16AM +, Nicholas Marriott wrote: > Well, it's complicated a bit because tty_attributes cal

Re: patch for setting pane background color

2015-02-14 Thread Nicholas Marriott
Well, it's complicated a bit because tty_attributes calls tty_reset. So perhaps it is better to check it in two places - tty_attributes and tty_reset. tty_reset can send SETAB/SETAF after SGR0 if either fg or bg is not 8. Or the call to tty_reset in tty_attributes could become a different functio

Re: patch for setting pane background color

2015-02-14 Thread Nicholas Marriott
In fact, since you will need to change tty_reset to call tty_attributes(&grid_default_cell) instead of sending SGR0, you will only need to check the default colours in tty_attributes itself. On Sat, Feb 14, 2015 at 09:16:35AM +, Nicholas Marriott wrote: > I was thinking that you do this in tt

Re: patch for setting pane background color

2015-02-14 Thread Nicholas Marriott
I was thinking that you do this in tty_open: if (!tty_term_has(tty->term, TTYC_BCE) tty->flags |= TTY_NOBCE; And use that instead of calling tty_term_has all the time. But actually it probably makes little difference, just using tty_term_has is probably fine. As far as th