Problem: When switching window in autocmd the restored cursor position may be wrong. Solution: Do not restore the cursor if it was not set. (closes #10775)