mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
fix(mouse): don't treat click on hsep as click on statusline (#29565)
This allows showing popup menu when right-clicking on hsep or cmdline.
This commit is contained in:
@@ -250,11 +250,17 @@ static int get_fpos_of_mouse(pos_T *mpos)
|
||||
}
|
||||
|
||||
// winpos and height may change in win_enter()!
|
||||
if (winrow >= wp->w_height_inner) { // In (or below) status line
|
||||
if (winrow >= wp->w_height_inner + wp->w_status_height) { // Below window
|
||||
if (mouse_grid <= 1 && mouse_row < Rows - p_ch
|
||||
&& mouse_row >= Rows - p_ch - global_stl_height()) { // In global status line
|
||||
return IN_STATUS_LINE;
|
||||
}
|
||||
return IN_UNKNOWN;
|
||||
} else if (winrow >= wp->w_height_inner) { // In window status line
|
||||
return IN_STATUS_LINE;
|
||||
}
|
||||
|
||||
if (winrow < 0 && winrow + wp->w_winbar_height >= 0) {
|
||||
if (winrow < 0 && winrow + wp->w_winbar_height >= 0) { // In winbar
|
||||
return MOUSE_WINBAR;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user