On Fri, Jan 31, 2014 at 7:45 PM, Nicholas Marriott <nicholas.marri...@gmail.com> wrote: > Ok you need to wait for Thomas to sync up the SF repo tonight or apply > this as well:
Sure, thanks! > > Index: format.c > =================================================================== > RCS file: /cvs/src/usr.bin/tmux/format.c,v > retrieving revision 1.39 > retrieving revision 1.40 > diff -u -p -r1.39 -r1.40 > --- format.c 11 Oct 2013 08:03:43 -0000 1.39 > +++ format.c 24 Nov 2013 11:29:09 -0000 1.40 > @@ -320,6 +320,13 @@ format_expand(struct format_tree *ft, co > if (format_replace(ft, fmt, n, &buf, &len, &off) != 0) > break; > fmt += n + 1; > + continue; > + case '#': > + while (len - off < 2) { > + buf = xrealloc(buf, 2, len); > + len *= 2; > + } > + buf[off++] = '#'; > continue; > default: > s = NULL; > > > > On Fri, Jan 31, 2014 at 04:50:11PM +0400, Azat Khuzhin wrote: >> With you patch: >> >> $ tmux -Lfoo new -s test >> For me, ###S converted to ##test >> >> On Fri, Jan 31, 2014 at 3:51 PM, Nicholas Marriott >> <nicholas.marri...@gmail.com> wrote: >> > Yes it works for me with ###S but if you could check what you were doing >> > also then that'd be good. >> > >> > >> > On Fri, Jan 31, 2014 at 03:45:21PM +0400, Azat Khuzhin wrote: >> >> On Fri, Jan 31, 2014 at 3:42 PM, Nicholas Marriott >> >> <nicholas.marri...@gmail.com> wrote: >> >> > Hi >> >> > >> >> > On Wed, Jan 22, 2014 at 03:18:14PM +0400, Azat Khuzhin wrote: >> >> >> @@ -333,7 +333,9 @@ format_expand(struct format_tree *ft, const char >> >> >> *fmt) >> >> >> - buf[off++] = ch; >> >> >> + if (ch != '#') { >> >> >> + buf[off++] = ch; >> >> >> + } >> >> > >> >> > There is already a case '#' in the switch so ch should never be '#'. >> >> > >> >> >> @@ -419,6 +419,9 @@ status_replace1(struct client *c, char **iptr, >> >> >> char **optr, char *out, >> >> >> goto do_replace; >> >> >> case '#': >> >> >> *(*optr)++ = '#'; >> >> >> + if (*(*iptr) && *(*iptr) == '#') { >> >> >> + *(*optr)++ = '#'; >> >> >> + } >> >> >> break; >> >> > >> >> > I think it's better just to remove this bit and leave ## replacement >> >> > purely to the format code, please try this: >> >> > >> >> > >> >> > Index: status.c >> >> > =================================================================== >> >> > RCS file: /cvs/src/usr.bin/tmux/status.c,v >> >> > retrieving revision 1.108 >> >> > diff -u -p -r1.108 status.c >> >> > --- status.c 28 Jan 2014 23:07:09 -0000 1.108 >> >> > +++ status.c 31 Jan 2014 11:40:21 -0000 >> >> > @@ -396,9 +396,6 @@ status_replace1(struct client *c, char * >> >> > case '{': >> >> > ptr = (char *) "#{"; >> >> > goto do_replace; >> >> > - case '#': >> >> > - *(*optr)++ = '#'; >> >> > - break; >> >> >> >> I think I already tried this patch, and it didn't help. >> >> But I will re-check later. >> >> >> >> Did you check it? >> >> >> >> > default: >> >> > xsnprintf(tmp, sizeof tmp, "#%c", *(*iptr - 1)); >> >> > ptr = tmp; >> >> >> >> >> >> >> >> -- >> >> Respectfully >> >> Azat Khuzhin >> >> >> >> -- >> Respectfully >> Azat Khuzhin -- Respectfully Azat Khuzhin ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users