diff options
author | Matthieu Coudron <mattator@gmail.com> | 2020-02-14 16:42:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-14 16:42:00 +0100 |
commit | bb331a9b31c441d47fc2cb3dcb87e0573f519dd9 (patch) | |
tree | 9f99387d0eac4d66f629cccd8b5c4204ac37305e /src | |
parent | 61c98a1cf271ca1b3604dae65727c957c7c71e96 (diff) | |
download | rneovim-bb331a9b31c441d47fc2cb3dcb87e0573f519dd9.tar.gz rneovim-bb331a9b31c441d47fc2cb3dcb87e0573f519dd9.tar.bz2 rneovim-bb331a9b31c441d47fc2cb3dcb87e0573f519dd9.zip |
mouse.c: can click on multibyte foldopen/foldclose (#11863)
would previously only work with ascii fillchars.
Added a test.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/mouse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c index dab2e44890..e395654e04 100644 --- a/src/nvim/mouse.c +++ b/src/nvim/mouse.c @@ -109,12 +109,12 @@ retnomove: if (flags & MOUSE_SETPOS) goto retnomove; // ugly goto... - // Remember the character under the mouse, it might be a '-' or '+' in the - // fold column. NB: only works for ASCII chars! + // Remember the character under the mouse, might be one of foldclose or + // foldopen fillchars in the fold column. if (row >= 0 && row < Rows && col >= 0 && col <= Columns && default_grid.chars != NULL) { - mouse_char = default_grid.chars[default_grid.line_offset[row] - + (unsigned)col][0]; + mouse_char = utf_ptr2char(default_grid.chars[default_grid.line_offset[row] + + (unsigned)col]); } else { mouse_char = ' '; } |