mirror of
https://github.com/tmux/tmux.git
synced 2024-11-16 09:28:51 +00:00
Do not put a space between status-left/status-right and the window list,
instead move the space into the defaults for the options (so status-left now defaults to "[#S] ". From Balazs Kezes.
This commit is contained in:
parent
10a9440055
commit
d24c9d7d3e
18
status.c
18
status.c
@ -193,9 +193,9 @@ status_redraw(struct client *c)
|
|||||||
*/
|
*/
|
||||||
needed = 0;
|
needed = 0;
|
||||||
if (llen != 0)
|
if (llen != 0)
|
||||||
needed += llen + 1;
|
needed += llen;
|
||||||
if (rlen != 0)
|
if (rlen != 0)
|
||||||
needed += rlen + 1;
|
needed += rlen;
|
||||||
if (c->tty.sx == 0 || c->tty.sx <= needed)
|
if (c->tty.sx == 0 || c->tty.sx <= needed)
|
||||||
goto out;
|
goto out;
|
||||||
wlavailable = c->tty.sx - needed;
|
wlavailable = c->tty.sx - needed;
|
||||||
@ -300,10 +300,8 @@ draw:
|
|||||||
|
|
||||||
/* Draw the left string and arrow. */
|
/* Draw the left string and arrow. */
|
||||||
screen_write_cursormove(&ctx, 0, 0);
|
screen_write_cursormove(&ctx, 0, 0);
|
||||||
if (llen != 0) {
|
if (llen != 0)
|
||||||
screen_write_cnputs(&ctx, llen, &lgc, utf8flag, "%s", left);
|
screen_write_cnputs(&ctx, llen, &lgc, utf8flag, "%s", left);
|
||||||
screen_write_putc(&ctx, &stdgc, ' ');
|
|
||||||
}
|
|
||||||
if (larrow != 0) {
|
if (larrow != 0) {
|
||||||
memcpy(&gc, &stdgc, sizeof gc);
|
memcpy(&gc, &stdgc, sizeof gc);
|
||||||
if (larrow == -1)
|
if (larrow == -1)
|
||||||
@ -313,21 +311,19 @@ draw:
|
|||||||
|
|
||||||
/* Draw the right string and arrow. */
|
/* Draw the right string and arrow. */
|
||||||
if (rarrow != 0) {
|
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);
|
memcpy(&gc, &stdgc, sizeof gc);
|
||||||
if (rarrow == -1)
|
if (rarrow == -1)
|
||||||
gc.attr ^= GRID_ATTR_REVERSE;
|
gc.attr ^= GRID_ATTR_REVERSE;
|
||||||
screen_write_putc(&ctx, &gc, '>');
|
screen_write_putc(&ctx, &gc, '>');
|
||||||
} else
|
} else
|
||||||
screen_write_cursormove(&ctx, c->tty.sx - rlen - 1, 0);
|
screen_write_cursormove(&ctx, c->tty.sx - rlen, 0);
|
||||||
if (rlen != 0) {
|
if (rlen != 0)
|
||||||
screen_write_putc(&ctx, &stdgc, ' ');
|
|
||||||
screen_write_cnputs(&ctx, rlen, &rgc, utf8flag, "%s", right);
|
screen_write_cnputs(&ctx, rlen, &rgc, utf8flag, "%s", right);
|
||||||
}
|
|
||||||
|
|
||||||
/* Figure out the offset for the window list. */
|
/* Figure out the offset for the window list. */
|
||||||
if (llen != 0)
|
if (llen != 0)
|
||||||
wloffset = llen + 1;
|
wloffset = llen;
|
||||||
else
|
else
|
||||||
wloffset = 0;
|
wloffset = 0;
|
||||||
if (wlwidth < wlavailable) {
|
if (wlwidth < wlavailable) {
|
||||||
|
3
tmux.1
3
tmux.1
@ -2581,6 +2581,9 @@ By default, UTF-8 in
|
|||||||
is not interpreted, to enable UTF-8, use the
|
is not interpreted, to enable UTF-8, use the
|
||||||
.Ic status-utf8
|
.Ic status-utf8
|
||||||
option.
|
option.
|
||||||
|
.Pp
|
||||||
|
The default is
|
||||||
|
.Ql "[#S] " .
|
||||||
.It Ic status-left-length Ar length
|
.It Ic status-left-length Ar length
|
||||||
Set the maximum
|
Set the maximum
|
||||||
.Ar length
|
.Ar length
|
||||||
|
Loading…
Reference in New Issue
Block a user