diff options
author | mikoto2000 <mikoto2000@gmail.com> | 2024-04-17 22:06:54 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-04-17 22:06:54 +0200 |
commit | e20fa59903525e15cecd680a2f32ece8a5d1bc0c (patch) | |
tree | 3d98c187460597c6d76c28b16faab77723425213 /src/mbyte.c | |
parent | acdfb8a97995e0f81832207e39564ba795281108 (diff) |
patch 9.1.0344: Cursor wrong after using setcellwidth() in terminalv9.1.0344
Problem: Cursor wrong after using setcellwidth() in terminal
(mikoto2000)
Solution: output additional spaces, so the behaviour matches the GUI
(mikoto2000)
fixes: #14539
closes: #14540
Signed-off-by: mikoto2000 <mikoto2000@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Fix CUI `setcellwidths` characters draw behavior to same GUI behavior.
Diffstat (limited to 'src/mbyte.c')
-rw-r--r-- | src/mbyte.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index 406d1093ff..07446ca561 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -5542,6 +5542,20 @@ string_convert_ext( return retval; } +/* + * Return 1 or 2 when "c" is in the cellwidth table. + * Return 0 if not. + */ + int +get_cellwidth(int c UNUSED) +{ +#ifdef FEAT_EVAL + return cw_value(c); +#else + return 0; +#endif +} + #if defined(FEAT_EVAL) || defined(PROTO) /* |