From c8e58bf09c4abc92c8689a80eb90150c5ff3cdfc Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 19 Aug 2023 19:40:26 +0800 Subject: vim-patch:9.0.1742: wrong curswant when clicking on second cell of double-width char (#24789) Problem: Wrong curswant when clicking and the second cell of a double-width char. Solution: Don't copy virtcol of the first char to the second one. closes: vim/vim#12842 https://github.com/vim/vim/commit/9994160bfe74501886bbbf5631aec8ea2ae05991 --- src/nvim/grid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/grid.c b/src/nvim/grid.c index e6817cd8be..fa7f270172 100644 --- a/src/nvim/grid.c +++ b/src/nvim/grid.c @@ -634,7 +634,7 @@ void grid_put_linebuf(ScreenGrid *grid, int row, int coloff, int endcol, int cle grid->vcols[off_to] = linebuf_vcol[off_from]; if (char_cells == 2) { - grid->vcols[off_to + 1] = linebuf_vcol[off_from]; + grid->vcols[off_to + 1] = linebuf_vcol[off_from + 1]; } off_to += (size_t)char_cells; -- cgit