vim-patch:9.2.0007: cindent: recognizing labels within commented lines

Problem:  Comment lines which start like a label are recognized as a
          label and indented based on that.
Solution: Check if the position is in a comment after recognizing a label
          in cin_islabel (Anttoni Erkkilä)

closes: vim/vim#19397

9af18686c7

Co-authored-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
This commit is contained in:
zeertzjq
2026-02-16 07:39:02 +08:00
parent 7d8653575f
commit b59eba3ada
2 changed files with 15 additions and 0 deletions

View File

@@ -1127,6 +1127,12 @@ func Test_cindent_1()
a();
}
void func() {
/* aaaaaa
bbbbb:
ccccccc */
}
/* end of AUTO */
[CODE]
@@ -2130,6 +2136,12 @@ func Test_cindent_1()
a();
}
void func() {
/* aaaaaa
bbbbb:
ccccccc */
}
/* end of AUTO */
[CODE]