diff options
| author | 2014-10-02 10:39:43 +0000 | |
|---|---|---|
| committer | 2014-10-02 10:39:43 +0000 | |
| commit | 1e8a1b428f372269ed2c09b55d4c7847ebecf3a3 (patch) | |
| tree | 19e35d5424f61701df3c1960653b2125acedcf04 | |
| parent | Update status when pane selected with mouse, from Balazs Kezes. (diff) | |
| download | wireguard-openbsd-1e8a1b428f372269ed2c09b55d4c7847ebecf3a3.tar.xz wireguard-openbsd-1e8a1b428f372269ed2c09b55d4c7847ebecf3a3.zip | |
Take account of window-status-separator when checking window position,
based on diff from Balazs Kezes.
| -rw-r--r-- | usr.bin/tmux/status.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 7dab624680e..3b84c7823c4 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.114 2014/04/24 09:14:43 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.115 2014/10/02 10:39:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -121,12 +121,17 @@ status_set_window_at(struct client *c, u_int x) { struct session *s = c->session; struct winlink *wl; + struct options *oo; + size_t len; x += c->wlmouse; RB_FOREACH(wl, winlinks, &s->windows) { + oo = &wl->window->options; + + len = strlen(options_get_string(oo, "window-status-separator")); if (x < wl->status_width && session_select(s, wl->idx) == 0) server_redraw_session(s); - x -= wl->status_width + 1; + x -= wl->status_width + len; } } |
