Starting in vim 7.4 patch 355, vim seems to get confused about the correct 
indenting level for C/C++ code when dealing with a line which ends in a 
semicolon in the context of a ‘for’ loop’s clause.  I’ve attached an example 
file which demonstrates the problem, and five variations which don’t exhibit 
the problem.  

Key factors for triggering the incorrect behaviour seem to be that there needs 
to be a newline following a semicolon inside parentheses, the parentheses must 
be followed by curly braces, and those curly braces must each be on separate 
lines.  Only if all these factors are present together does vim get confused 
about the correct indent level.

This behaviour doesn’t happen in 7.4 patch 354 (hg revision 6029), but is 
visible in 7.4 patch 355 (hg revision 6030) and beyond, and is still visible in 
the current hg tip.

All the best,
Trevor

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: indent_test.c
Description: Binary data

Raspunde prin e-mail lui