'format indentation' and comments

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
#NULL
Addict
Addict
Posts: 1497
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

'format indentation' and comments

Post by #NULL »

formating indentation works a bit odd next to lines of comments because the IDE sets the ; at the beginning of a line.

Code: Select all

If 1
  If 1
    abc = 1
;     abc = 2
;     abc = 3
;     abc = 4
    abc = 5
  EndIf
EndIf
if you press return at the end of abc = 4 then the next line is indented to the very beginning. the same if you press return before 'abc = 5' or if you cntrl-i that line.
you should either change the way the IDE puts comments (don't put the ; at the beginning of the line but at the beginnin of code / keeping the indentation) or find a way to not let comments influence the indentation steps.
also if you mark all this code and cntrl-i it you can see that comments and indentation doesn't work well toghether right now.