Indentation working for undo as well!!!! - apart from resetting new lines
Indentation stuff now fully working, The solution is a little hacky -- repaint all new lines every turn