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

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to