mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Ignore mouse on status line which are not part of a range, GitHub issue 1649.
This commit is contained in:
parent
b4a301f8fe
commit
517d673dbe
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user