From 517d673dbe4b7b5ab290203868d871a712624446 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 25 Mar 2019 09:22:09 +0000 Subject: Ignore mouse on status line which are not part of a range, GitHub issue 1649. --- server-client.c | 18 +++++++++--------- 1 file 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; } } -- cgit v1.2.3