aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/mouse.c')
-rw-r--r--src/nvim/mouse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c
index 6f636f643a..96d20b6a32 100644
--- a/src/nvim/mouse.c
+++ b/src/nvim/mouse.c
@@ -108,12 +108,13 @@ retnomove:
goto retnomove; // ugly goto...
// Remember the character under the mouse, it might be a '-' or '+' in the
- // fold column.
+ // fold column. NB: only works for ASCII chars!
if (row >= 0 && row < Rows && col >= 0 && col <= Columns
- && ScreenLines != NULL)
- mouse_char = ScreenLines[LineOffset[row] + (unsigned)col];
- else
+ && ScreenLines != NULL) {
+ mouse_char = ScreenLines[LineOffset[row] + (unsigned)col][0];
+ } else {
mouse_char = ' ';
+ }
old_curwin = curwin;
old_cursor = curwin->w_cursor;