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

This commit is contained in:
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); m->statusat = status_at_line(c);
if (m->statusat != -1 && if (m->statusat != -1 &&
y >= (u_int)m->statusat && 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); sr = status_get_range(c, x, y - m->statusat);
else if (sr == NULL)
sr = NULL; return (KEYC_UNKNOWN);
if (sr != NULL) {
switch (sr->type) { switch (sr->type) {
case STYLE_RANGE_NONE: case STYLE_RANGE_NONE:
break; return (KEYC_UNKNOWN);
case STYLE_RANGE_LEFT: case STYLE_RANGE_LEFT:
where = STATUS_LEFT; where = STATUS_LEFT;
break; break;
@ -522,10 +521,11 @@ have_event:
break; break;
case STYLE_RANGE_WINDOW: case STYLE_RANGE_WINDOW:
wl = winlink_find_by_index(&s->windows, sr->argument); wl = winlink_find_by_index(&s->windows, sr->argument);
if (wl != NULL) { if (wl == NULL)
m->w = wl->window->id; return (KEYC_UNKNOWN);
where = STATUS; m->w = wl->window->id;
}
where = STATUS;
break; break;
} }
} }