zhangyuting / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

C Indenting after multi-line 'for' loop clause #247

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Be running vim 7.4 patch 355 or later.
2. Open the attached source file and use `gg=G` to have vim reindent the code.
3. Note that vim chooses an incorrect indent level for the lines after the 
final 'for' loop in the example source code.

What is the expected output? What do you see instead?

After a for loop with a multiple-line loop clause, and after the loop block, 
vim wants to indent the subsequent code (outside of the loop body) two levels 
too deep.  (See the short sample file for a clear example of the problem)

What version of the product are you using? On what operating system?

This occurs in vim 7.4 patch 355 through 389 on OSX -- I haven't tested beyond 
389 but this behaviour was definitely introduced in patch 355;  it doesn't 
happen at patch level 354.

Original issue reported on code.google.com by tre...@gridbug.org on 6 Aug 2014 at 11:46

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed by patch 7.4.395

Original comment by brammool...@gmail.com on 6 Aug 2014 at 3:46