Cache cursor position.

Caching is done on close (you need to call CodeEdit.file.close  when closing the editor)