this fixes the auto indentation

I found when I was on the end of a if statement and hit newline twice it would start stair stepping the indentation level

I also found when I was at the start of a line with code on it and hit newline, the line I was on would be double indented

this pull fixes both of those.