From f971536f461e2c54ac72c9e1c5bb399f8ce91395 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 19 May 2022 19:16:17 +0800 Subject: fix(mouse): fix mouse drag position with winbar or border in multigrid --- src/nvim/mouse.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c index 862899e78b..8736c73080 100644 --- a/src/nvim/mouse.c +++ b/src/nvim/mouse.c @@ -273,6 +273,9 @@ retnomove: if (grid == 0) { row -= curwin->w_grid_alloc.comp_row + curwin->w_grid.row_offset; col -= curwin->w_grid_alloc.comp_col + curwin->w_grid.col_offset; + } else if (grid != DEFAULT_GRID_HANDLE) { + row -= curwin->w_grid.row_offset; + col -= curwin->w_grid.col_offset; } // When clicking beyond the end of the window, scroll the screen. -- cgit