]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0610: cindent: closing brace in a comment affects the next line's indent v9.2.0610
authorHirohito Higashi <h.east.727@gmail.com>
Tue, 9 Jun 2026 19:35:02 +0000 (19:35 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 9 Jun 2026 19:35:02 +0000 (19:35 +0000)
commit9dd86dff9b48928bfca1b37a60eaa98da77bfde3
tree428f7f69e707e9491eaf2fffc9cc7e1ac93cf6e2
parente2cf855bbe751f14b98b5e2b1542fb2bfc5bfe74
patch 9.2.0610: cindent: closing brace in a comment affects the next line's indent

Problem:  A '}' inside a // line comment changes the indentation of the
          following line inside an enum or struct (rendcrx).
Solution: Stop scanning the line once a line comment is reached, so a brace
          inside the comment is no longer mistaken for an unmatched brace.

fixes:  #20455
closes: #20458

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/cindent.c
src/testdir/test_cindent.vim
src/version.c