texteditor: Use old caret position when reopening data