Page 1 of 1

Python code folding bug

Posted: Thu Mar 15, 2012 10:20 am
by gwgs
sample code

Code: Select all

def test():
   a=1
   b=2
   if a==b:
         c='cat'
   else:
         d='dog'
         e='elephant'
         f=e[:5]
   if b==2:
       g='giraffe'
should fold up to

Code: Select all

def test(): [...]
but instead folds to:

Code: Select all

def test(): [...]
         f=e[:5]
   if b==2:
       g='giraffe'
problem seems to be when a colon is used on the same line as set of square brackets.
I notice it when I fold code and the indent markers disappear for that line too.


Thanks

Grant

Posted: Thu Mar 15, 2012 10:22 am
by gwgs
running Zeus 3.97g and 3.97i beta on windows 7 64 bit

Posted: Thu Mar 15, 2012 12:25 pm
by jussij
Thanks for the bug report. I have managed to replicate the bug at this end.

Watch this space for a fix shortly.

Cheers Jussi

Posted: Mon Mar 19, 2012 1:53 am
by jussij
This bug is fixed in the latest Zeus release found here: http://www.zeusedit.com/zforum/viewforum.php?f=6

Posted: Thu Mar 22, 2012 7:38 am
by gwgs
Thanks Jussi that works fine