summaryrefslogtreecommitdiffstats
path: root/status.c
diff options
context:
space:
mode:
authornicm <nicm>2014-10-02 10:39:43 +0000
committernicm <nicm>2014-10-02 10:39:43 +0000
commitd306bbe11e9701235a468e463699a832b89d6f4d (patch)
treedaaac68ff50e4e6e30ee55a2b23a8cd51dce9953 /status.c
parentc011446e781eae4fd1116dacc63a3e26c2f47788 (diff)
Take account of window-status-separator when checking window position,
based on diff from Balazs Kezes.
Diffstat (limited to 'status.c')
-rw-r--r--status.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/status.c b/status.c
index 4ea42f1c..96110c77 100644
--- a/status.c
+++ b/status.c
@@ -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;
}
}