#1295 Wrong order of comments in outline

open
nobody
None
5
2011-03-03
2011-03-03
No

The order of comments for the following code is wrong in the outline view (I have replace spaces with dots to preserve indentation):

#---.1.--
if.x:
....#---.2.--
....if.y:
........#---.2A.---
........pass
....else:
........#---.2B.---
........pass
........#---.2C.---
........if.z:
............pass
....#---.3.---
....pass

The outline view shows it as

# 1
.. # 2
.... # 2A
.... # 2C
.. # 3
.... # 2B

The comment 2B should be between 2A and 2C, not below 3.

There was a similar problem in 117499 that has already been fixed - thanks a lot!

Discussion