diff options
author | nicm <nicm> | 2019-03-25 09:22:09 +0000 |
---|---|---|
committer | nicm <nicm> | 2019-03-25 09:22:09 +0000 |
commit | 517d673dbe4b7b5ab290203868d871a712624446 (patch) | |
tree | 80849b027f1b5d0f041ffc48ef7ef65338a51662 | |
parent | b4a301f8feef6f2fef99988688b27e2aec898bae (diff) |
Ignore mouse on status line which are not part of a range, GitHub issue 1649.
-rw-r--r-- | server-client.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/server-client.c b/server-client.c index eee5dff5..6ef34f83 100644 --- a/server-client.c +++ b/server-client.c @@ -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; } } |