reset cursor position after loading new text into text buffer