Added dynamic window resizing on change of text. Fixed cursor display issue