diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-03-25 09:22:10 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-03-25 09:22:10 +0000 |
commit | 1b3644a54bb765ae272a5789f4cff080d627cd26 (patch) | |
tree | 9cb5c4ae6e9f6035ffb1b1e407c962a3cce5fe77 /usr.bin/tmux | |
parent | 3cd76e15b5bfa4bbc5e6b850c30ea8bc5c9e423b (diff) |
Ignore mouse on status line which are not part of a range, GitHub issue 1649.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/server-client.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 410ff19b606..42ec9c45981 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.272 2019/03/18 20:53:33 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.273 2019/03/25 09:22:09 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -506,14 +506,13 @@ have_event: m->statusat = status_at_line(c); if (m->statusat != -1 && y >= (u_int)m->statusat && - y < m->statusat + status_line_size(c)) + y < m->statusat + status_line_size(c)) { sr = status_get_range(c, x, y - m->statusat); - else - sr = NULL; - if (sr != NULL) { + if (sr == NULL) + return (KEYC_UNKNOWN); switch (sr->type) { case STYLE_RANGE_NONE: - break; + return (KEYC_UNKNOWN); case STYLE_RANGE_LEFT: where = STATUS_LEFT; break; @@ -522,10 +521,11 @@ have_event: break; case STYLE_RANGE_WINDOW: wl = winlink_find_by_index(&s->windows, sr->argument); - if (wl != NULL) { - m->w = wl->window->id; - where = STATUS; - } + if (wl == NULL) + return (KEYC_UNKNOWN); + m->w = wl->window->id; + + where = STATUS; break; } } |