Save cursor position when a document is closed. When the file is reopened, the cursor is positioned at the saved position.