Added ability to edit text in the current line by pressing the left and
right arrow keys in TextWriter.