patch 9.1.1190: C indentation does not detect multibyte labels
Problem: C indentation does not detect multibyte labels
Solution: Correctly skip over multibyte characters
(Anttoni Erkkilä)
closes: #16770
Signed-off-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/cindent.c b/src/cindent.c
index cf18441..2414b3f 100644
--- a/src/cindent.c
+++ b/src/cindent.c
@@ -405,7 +405,12 @@
return FALSE;
while (vim_isIDc(**s))
- (*s)++;
+ {
+ if (has_mbyte)
+ (*s) += (*mb_ptr2len)(*s);
+ else
+ (*s)++;
+ }
*s = cin_skipcomment(*s);