Revision: 2779
http://tmux.svn.sourceforge.net/tmux/?rev=2779&view=rev
Author: tcunha
Date: 2012-04-24 16:20:18 +0000 (Tue, 24 Apr 2012)
Log Message:
-----------
Sync OpenBSD patchset 1097:
Add window-status-separator option, from Thomas Adam.
Modified Paths:
--------------
trunk/options-table.c
trunk/status.c
trunk/tmux.1
Modified: trunk/options-table.c
===================================================================
--- trunk/options-table.c 2012-04-24 16:19:27 UTC (rev 2778)
+++ trunk/options-table.c 2012-04-24 16:20:18 UTC (rev 2779)
@@ -690,6 +690,11 @@
.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
Modified: trunk/status.c
===================================================================
--- trunk/status.c 2012-04-24 16:19:27 UTC (rev 2778)
+++ trunk/status.c 2012-04-24 16:20:18 UTC (rev 2779)
@@ -160,11 +160,12 @@
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 @@
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 @@
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);
Modified: trunk/tmux.1
===================================================================
--- trunk/tmux.1 2012-04-24 16:19:27 UTC (rev 2778)
+++ trunk/tmux.1 2012-04-24 16:20:18 UTC (rev 2779)
@@ -2704,6 +2704,10 @@
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
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs