Ignore mouse on status line which are not part of a range, GitHub issue 1649.

pull/1653/head
nicm 2019-03-25 09:22:09 +00:00
parent b4a301f8fe
commit 517d673dbe
1 changed files with 9 additions and 9 deletions

View File

@ -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;
}
}