patch 9.1.0186: cursor pos wrong on mouse click after eol with 'rl', 've' and conceal
Problem: Wrong cursor position when clicking after end of line with
'rightleft', 'virtualedit' and conceal.
Solution: Set values in ScreenCols[] also with SLF_RIGHTLEFT. Also fix
off-by-one cursor position with 'colorcolumn' (zeertzjq).
closes: #14218
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/drawline.c b/src/drawline.c
index cc1bed6..ed02f3c 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -975,15 +975,14 @@
++wlv->off;
++wlv->col;
}
+ ++wlv->vcol;
- if (VCOL_HLC >= rightmost_vcol
+ if (VCOL_HLC > rightmost_vcol
# ifdef LINE_ATTR
&& wlv->line_attr == 0
# endif
&& wlv->win_attr == 0)
break;
-
- ++wlv->vcol;
}
}
#endif