fix(terminal): check if mouse on statusline/tabline/winbar/vsep (#26892)

This commit is contained in:
zeertzjq
2024-01-05 10:59:52 +08:00
committed by GitHub
parent dab5844082
commit e09adfdcff
3 changed files with 134 additions and 4 deletions

View File

@@ -1437,8 +1437,10 @@ static bool send_mouse_event(Terminal *term, int c)
}
int offset;
if (term->forward_mouse && mouse_win->w_buffer->terminal == term
&& col >= (offset = win_col_off(mouse_win))) {
if (term->forward_mouse && mouse_win->w_buffer->terminal == term && row >= 0
&& (grid > 1 || row + mouse_win->w_winbar_height < mouse_win->w_height)
&& col >= (offset = win_col_off(mouse_win))
&& (grid > 1 || col < mouse_win->w_width)) {
// event in the terminal window and mouse events was enabled by the
// program. translate and forward the event
int button;