fixed window aligning on InsertChar
Added automatic line indentation