keep cursor pos when saving