Re-add ResCur funcion for remember cursor position in last time