Fixed a bug with text grid line input in the middle of an existing selection