diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-19 19:40:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-19 19:40:26 +0800 |
commit | c8e58bf09c4abc92c8689a80eb90150c5ff3cdfc (patch) | |
tree | cf1a9ffc524fdaa268f847139b0c60931a3559af /src/nvim/grid.c | |
parent | d9b094660944969b5160f2d22f0c2e8627e10d92 (diff) | |
download | rneovim-c8e58bf09c4abc92c8689a80eb90150c5ff3cdfc.tar.gz rneovim-c8e58bf09c4abc92c8689a80eb90150c5ff3cdfc.tar.bz2 rneovim-c8e58bf09c4abc92c8689a80eb90150c5ff3cdfc.zip |
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
Diffstat (limited to 'src/nvim/grid.c')
-rw-r--r-- | src/nvim/grid.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |