summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-11-05 23:15:12 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-11-05 23:15:12 +0000
commita00b3bf0b9f6fdabf8d3027638ffd26cf87746f8 (patch)
treeac7e2ccccecc0991210e58c0bb94ffcf60672424 /usr.bin/tmux
parent626bd68561948953b6314b6746c7cb236018aa56 (diff)
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.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/options-table.c6
-rw-r--r--usr.bin/tmux/status.c20
-rw-r--r--usr.bin/tmux/tmux.17
3 files changed, 16 insertions, 17 deletions
diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c
index ca098c08525..3aeb498b9ee 100644
--- a/usr.bin/tmux/options-table.c
+++ b/usr.bin/tmux/options-table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options-table.c,v 1.50 2014/04/17 12:57:28 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.51 2014/11/05 23:15:11 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -390,7 +390,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",
@@ -431,7 +431,7 @@ const struct options_table_entry session_options_table[] = {
{ .name = "status-right",
.type = OPTIONS_TABLE_STRING,
- .default_str = "\"#{=22:pane_title}\" %H:%M %d-%b-%y"
+ .default_str = " \"#{=22:pane_title}\" %H:%M %d-%b-%y"
},
{ .name = "status-right-attr",
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index 08a4739f391..8543fcec797 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.117 2014/10/20 23:57:14 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.118 2014/11/05 23:15:11 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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;
@@ -300,10 +300,8 @@ draw:
/* Draw the left string and arrow. */
screen_write_cursormove(&ctx, 0, 0);
- if (llen != 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);
if (larrow == -1)
@@ -313,21 +311,19 @@ 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);
- if (rlen != 0) {
- screen_write_putc(&ctx, &stdgc, ' ');
+ screen_write_cursormove(&ctx, c->tty.sx - rlen, 0);
+ if (rlen != 0)
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/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index 252bcff09a7..5c5b805fa9b 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.404 2014/10/25 08:47:04 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.405 2014/11/05 23:15:11 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 25 2014 $
+.Dd $Mdocdate: November 5 2014 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -2581,6 +2581,9 @@ By default, UTF-8 in
is not interpreted, to enable UTF-8, use the
.Ic status-utf8
option.
+.Pp
+The default is
+.Ql "[#S] " .
.It Ic status-left-length Ar length
Set the maximum
.Ar length