remember cursor position and set focus when switching files