]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1626: cindent: does not handle compound literals v9.1.1626
authorAnttoni Erkkilä <anttoni.erkkila@protonmail.com>
Tue, 12 Aug 2025 19:59:06 +0000 (21:59 +0200)
committerChristian Brabandt <cb@256bit.org>
Tue, 12 Aug 2025 19:59:06 +0000 (21:59 +0200)
commit5ba6e41d37ec29fc8360a4f06d4e95c63eb013ab
treee9edcd68c3ffacd461395bb223865c6f1d1977ab
parent59e1d7f353993e93be97dbec30d3218742960f62
patch 9.1.1626: cindent: does not handle compound literals

Problem:  C-indent does not handle compound literals
          (@44100hertz, @Jorenar)
Solution: Detect and handle compound literal and structure
          initialization (Anttoni Erkkilä)

match '=' or "return" optionally followed by &, (typecast), {
Fixes also initialization which begins with multiple opening braces.

fixes: #2090
fixes: #12491
closes: #17865

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