]> git.ipfire.org Git - thirdparty/vim.git/commit
runtime(c): compound literal braces are highlighted as errors
authorBogdan Barbu <l4b.bogdan.barbu@gmail.com>
Tue, 4 Aug 2026 21:11:56 +0000 (21:11 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 4 Aug 2026 21:11:56 +0000 (21:11 +0000)
commit5a1124e4f59fafa0c774db956ae1e86bdd259442
treea78fdac21c8e349a03081234301804994144a287
parent9e4e00710c712a216324a811af5b79a48a9ecf4c
runtime(c): compound literal braces are highlighted as errors

Problem: Braces in C compound literals and initializers inside parentheses
         and brackets are highlighted as errors.

Solution: Recognize those initializer blocks while preserving syntax recovery
          for malformed parentheses.

fixes:  #18709
closes: #20842

Signed-off-by: Bogdan Barbu <l4b.bogdan.barbu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/c.vim
runtime/syntax/testdir/dumps/c_initializer_00.dump [new file with mode: 0644]
runtime/syntax/testdir/input/c_initializer.c [new file with mode: 0644]