aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-02 15:25:41 +0800
committerGitHub <noreply@github.com>2023-05-02 15:25:41 +0800
commit7c1921e9d69e008781c9fb16c11e843f7bd9099a (patch)
tree2812af15ca89b1abd68009d00dc48b6af0849aaf /src
parent86c9d8b53cd9c2713eb2f7fa07732ca9a65a4afb (diff)
downloadrneovim-7c1921e9d69e008781c9fb16c11e843f7bd9099a.tar.gz
rneovim-7c1921e9d69e008781c9fb16c11e843f7bd9099a.tar.bz2
rneovim-7c1921e9d69e008781c9fb16c11e843f7bd9099a.zip
fix(mouse): fix popup_setpos position check with ext_multigrid (#23436)
Diffstat (limited to 'src')
-rw-r--r--src/nvim/mouse.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c
index e03eec184f..09352b370e 100644
--- a/src/nvim/mouse.c
+++ b/src/nvim/mouse.c
@@ -223,7 +223,7 @@ static int get_fpos_of_mouse(pos_T *mpos)
}
// winpos and height may change in win_enter()!
- if (winrow + wp->w_winbar_height >= wp->w_height) { // In (or below) status line
+ if (winrow + wp->w_winbar_height >= wp->w_height_inner) { // In (or below) status line
return IN_STATUS_LINE;
}
@@ -231,7 +231,7 @@ static int get_fpos_of_mouse(pos_T *mpos)
return MOUSE_WINBAR;
}
- if (wincol >= wp->w_width) { // In vertical separator line
+ if (wincol >= wp->w_width_inner) { // In vertical separator line
return IN_SEP_LINE;
}
@@ -557,10 +557,7 @@ bool do_mouse(oparg_T *oap, int c, int dir, long count, bool fixindent)
if (VIsual_active) {
// set MOUSE_MAY_STOP_VIS if we are outside the selection
// or the current window (might have false negative here)
- if (mouse_row < curwin->w_winrow
- || mouse_row > (curwin->w_winrow + curwin->w_height)) {
- jump_flags = MOUSE_MAY_STOP_VIS;
- } else if (m_pos_flag != IN_BUFFER) {
+ if (m_pos_flag != IN_BUFFER) {
jump_flags = MOUSE_MAY_STOP_VIS;
} else {
if (VIsual_mode == 'V') {