]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1877: cindent: wrong indentation after an array declaration v9.1.1877
authorAnttoni Erkkilä <anttoni.erkkila@protonmail.com>
Sun, 26 Oct 2025 19:46:38 +0000 (19:46 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 26 Oct 2025 19:46:38 +0000 (19:46 +0000)
commit61ef8a3db927162854c8a208ec603f55a6cd6449
treebffc6b47862ad9dd859d2327e9a93d7900289336
parentc8eeda9b15a9bac7745004b94f98de7681accea8
patch 9.1.1877: cindent: wrong indentation after an array declaration

Problem:  cindent: wrong indentation after an array declaration
Solution: check if the filetype if javascript before matching the syntax
          (Anttoni Erkkilä)

cindent matches a javascript syntax for C files causing wrong
indentation in the following case:
```
void foo() {
float a[5],
b;
}
```

closes: #18631

Signed-off-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/cindent.c
src/testdir/test_cindent.vim
src/version.c