diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/options-table.c | 7 | ||||
-rw-r--r-- | usr.bin/tmux/status.c | 18 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 6 |
3 files changed, 24 insertions, 7 deletions
diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c index 0b754747f90..c7bacdf9287 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.27 2012/04/01 13:18:38 nicm Exp $ */ +/* $OpenBSD: options-table.c,v 1.28 2012/04/23 22:23:14 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -691,6 +691,11 @@ const struct options_table_entry window_options_table[] = { .default_str = "#I:#W#F" }, + { .name = "window-status-separator", + .type = OPTIONS_TABLE_STRING, + .default_str = " " + }, + { .name = "wrap-search", .type = OPTIONS_TABLE_FLAG, .default_num = 1 diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 43c8c9cb43d..de2eaa2d445 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.90 2012/03/17 18:24:07 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.91 2012/04/23 22:23:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -160,11 +160,12 @@ status_redraw(struct client *c) struct winlink *wl; struct screen old_status, window_list; struct grid_cell stdgc, lgc, rgc, gc; + struct options *oo; time_t t; - char *left, *right; + char *left, *right, *sep; u_int offset, needed; u_int wlstart, wlwidth, wlavailable, wloffset, wlsize; - size_t llen, rlen; + size_t llen, rlen, seplen; int larrow, rarrow, utf8flag; /* No status line? */ @@ -230,7 +231,11 @@ status_redraw(struct client *c) if (wl == s->curw) wloffset = wlwidth; - wlwidth += wl->status_width + 1; + + oo = &wl->window->options; + sep = options_get_string(oo, "window-status-separator"); + seplen = screen_write_strlen(utf8flag, "%s", sep); + wlwidth += wl->status_width + seplen; } /* Create a new screen for the window list. */ @@ -241,7 +246,10 @@ status_redraw(struct client *c) RB_FOREACH(wl, winlinks, &s->windows) { screen_write_cnputs(&ctx, -1, &wl->status_cell, utf8flag, "%s", wl->status_text); - screen_write_putc(&ctx, &stdgc, ' '); + + oo = &wl->window->options; + sep = options_get_string(oo, "window-status-separator"); + screen_write_nputs(&ctx, -1, &stdgc, utf8flag, "%s", sep); } screen_write_stop(&ctx); diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index f5c5a45ef8d..1b86de9bbf4 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.289 2012/04/23 22:10:45 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.290 2012/04/23 22:23:14 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> .\" @@ -2700,6 +2700,10 @@ option for details of special character sequences available. The default is .Ql #I:#W#F . .Pp +.It Ic window-status-separator Ar string +Sets the separator drawn between windows in the status line. +The default is a single space character. +.Pp .It Xo Ic xterm-keys .Op Ic on | off .Xc |