Applied, thanks.

On Thu, Oct 30, 2014 at 10:56:08PM +0000, Balazs Kezes wrote:
> Don't force adding spaces after/before the window list. This can rather be
> achieved by changing the status-left/status-right options. In fact when
> status-justify is right meaning we place the window list to the right, we will
> see two separating spaces by default: one for window-status-separator and one
> for the forced space. This patch also fixes that.
> ---
> The OP's issue should be quite simply fixable if you move the extra space into
> the status-left option form which it can be easily removed by the users.
> 
>  options-table.c |  2 +-
>  status.c        | 12 +++++-------
>  tmux.1          |  4 +++-
>  3 files changed, 9 insertions(+), 9 deletions(-)
> diff --git a/options-table.c b/options-table.c
> index 8d680b3..3dfa004 100644
> --- a/options-table.c
> +++ b/options-table.c
> @@ -389,7 +389,7 @@ const struct options_table_entry session_options_table[] 
> = {
>  
>       { .name = "status-left",
>         .type = OPTIONS_TABLE_STRING,
> -       .default_str = "[#S]"
> +       .default_str = "[#S] "
>       },
>  
>       { .name = "status-left-attr",
> diff --git a/status.c b/status.c
> index 19b0ec8..d2a18da 100644
> --- a/status.c
> +++ b/status.c
> @@ -193,9 +193,9 @@ status_redraw(struct client *c)
>        */
>       needed = 0;
>       if (llen != 0)
> -             needed += llen + 1;
> +             needed += llen;
>       if (rlen != 0)
> -             needed += rlen + 1;
> +             needed += rlen;
>       if (c->tty.sx == 0 || c->tty.sx <= needed)
>               goto out;
>       wlavailable = c->tty.sx - needed;
> @@ -302,7 +302,6 @@ draw:
>       screen_write_cursormove(&ctx, 0, 0);
>       if (llen != 0) {
>               screen_write_cnputs(&ctx, llen, &lgc, utf8flag, "%s", left);
> -             screen_write_putc(&ctx, &stdgc, ' ');
>       }
>       if (larrow != 0) {
>               memcpy(&gc, &stdgc, sizeof gc);
> @@ -313,21 +312,20 @@ draw:
>  
>       /* Draw the right string and arrow. */
>       if (rarrow != 0) {
> -             screen_write_cursormove(&ctx, c->tty.sx - rlen - 2, 0);
> +             screen_write_cursormove(&ctx, c->tty.sx - rlen - 1, 0);
>               memcpy(&gc, &stdgc, sizeof gc);
>               if (rarrow == -1)
>                       gc.attr ^= GRID_ATTR_REVERSE;
>               screen_write_putc(&ctx, &gc, '>');
>       } else
> -             screen_write_cursormove(&ctx, c->tty.sx - rlen - 1, 0);
> +             screen_write_cursormove(&ctx, c->tty.sx - rlen, 0);
>       if (rlen != 0) {
> -             screen_write_putc(&ctx, &stdgc, ' ');
>               screen_write_cnputs(&ctx, rlen, &rgc, utf8flag, "%s", right);
>       }
>  
>       /* Figure out the offset for the window list. */
>       if (llen != 0)
> -             wloffset = llen + 1;
> +             wloffset = llen;
>       else
>               wloffset = 0;
>       if (wlwidth < wlavailable) {
> diff --git a/tmux.1 b/tmux.1
> index 273bcdc..c4bc954 100644
> --- a/tmux.1
> +++ b/tmux.1
> @@ -2584,7 +2584,9 @@ By default, UTF-8 in
>  .Ar string
>  is not interpreted, to enable UTF-8, use the
>  .Ic status-utf8
> -option.
> +option. The default is
> +.Ql [#S]\ 
> +which is the session's name in square brackets.
>  .It Ic status-left-length Ar length
>  Set the maximum
>  .Ar length
> -- 
> 2.1.3
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

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

Reply via email to