mirror of
https://github.com/neovim/neovim.git
synced 2026-02-18 10:21:26 +10:00
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:
@@ -370,6 +370,9 @@ static bool cin_islabel(void) // XXX
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ind_find_start_CORS(NULL)) {
|
||||
return false; // Don't accept a label in a comment or a raw string.
|
||||
}
|
||||
// Only accept a label if the previous line is terminated or is a case
|
||||
// label.
|
||||
pos_T cursor_save;
|
||||
|
||||
Reference in New Issue
Block a user