summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2018-08-20 20:41:59 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2018-08-20 20:41:59 +0000
commit085b7dbf6bee6d9ed52cc7557c3c6241acb8ded4 (patch)
treebf4422b98ce33a6de8b2aadda500f31487da5a35 /usr.bin
parentbe9f78ec33b526fd9260b23e81c1e4fe27339409 (diff)
Move offset of window list into status struct.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/status.c6
-rw-r--r--usr.bin/tmux/tmux.h5
2 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index 2574a09f53b..01726687a9f 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.177 2018/08/19 16:45:03 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.178 2018/08/20 20:41:58 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -284,7 +284,7 @@ status_get_window_at(struct client *c, u_int x)
const char *sep;
size_t seplen;
- x += c->wlmouse;
+ x += c->status.window_list_offset;
RB_FOREACH(wl, winlinks, &s->windows) {
oo = wl->window->options;
@@ -506,7 +506,7 @@ draw:
wloffset++;
/* Copy the window list. */
- c->wlmouse = -wloffset + wlstart;
+ c->status.window_list_offset = -wloffset + wlstart;
screen_write_cursormove(&ctx, wloffset, 0);
screen_write_fast_copy(&ctx, &window_list, wlstart, 0, wlwidth, 1);
screen_free(&window_list);
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index c34eab2ca1c..83989cbceee 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.841 2018/08/19 20:13:07 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.842 2018/08/20 20:41:58 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1278,8 +1278,11 @@ struct cmd_entry {
/* Status line. */
struct status_line {
struct event timer;
+
struct screen status;
struct screen *old_status;
+
+ int window_list_offset;
};
/* Client connection. */