vim-patch:9.0.0077: wrong restored cursor position when switching window in autocmd

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 vim/vim#10775)

b03950fafa

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-08-21 16:24:44 +08:00
parent bd9a9e63bc
commit 00ad0c81b6

View File

@@ -2962,7 +2962,6 @@ endfunc
func Test_autocmd_SafeState() func Test_autocmd_SafeState()
CheckRunVimInTerminal CheckRunVimInTerminal
let g:test_is_flaky = 1
let lines =<< trim END let lines =<< trim END
let g:safe = 0 let g:safe = 0