Vimjas / vim-python-pep8-indent

A nicer Python indentation style for vim.
Creative Commons Zero v1.0 Universal
790 stars 69 forks source link

Refix issue #5 (Correct indent after end of block) #24

Closed has2k1 closed 10 years ago

has2k1 commented 10 years ago

The implementation clean up reintroduced a more severe version of the bug. Plus, the test was slightly deficient to catch the regression.

Problem

Given two adjacent blocks where the 2nd block has an equal or smaller indentation level compared to the 1st block. If the 1st block does not end in a stop statement it always sucks up the 2nd block.

This changes the meaning of code that already adheres to the pep8 standard.

Solution

Do not inherit indentation of the previous line if the current line has less indentation but is valid.

has2k1 commented 10 years ago

Please do not merge as yet, bug not fully fixed.

has2k1 commented 10 years ago

This has been fully fixed and a test added to catch the variation of the bug that was not fixed.