added cursor position/code folding saving upon exiting and reopening