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;
default:
xsnprintf(tmp, sizeof tmp, "#%c", *(*iptr - 1));
ptr = tmp;
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users