don't insert leading space if inserting on empty line
fix detection whether point is inside string