forked from aniani/vim
patch 9.0.1312: Cursor position wrong when splitting window in insert mode
Problem: Cursor position wrong when splitting window in insert mode.
Solution: Pass the actual mode to win_fix_cursor(). (Luuk van Baal,
closes #11999,
This commit is contained in:
committed by
Bram Moolenaar
parent
339e114d70
commit
bc3dc298b3
@@ -1753,14 +1753,7 @@ func Test_splitkeep_options()
|
||||
|
||||
" Scroll when cursor becomes invalid in insert mode.
|
||||
norm Lic
|
||||
call assert_equal(curpos[0], getcurpos()[0], 'run ' .. run)
|
||||
|
||||
" The line number might be one less because of round-off.
|
||||
call assert_inrange(curpos[1] - 1, curpos[1], getcurpos()[1], 'run ' .. run)
|
||||
|
||||
call assert_equal(curpos[2], getcurpos()[2], 'run ' .. run)
|
||||
call assert_equal(curpos[3], getcurpos()[3], 'run ' .. run)
|
||||
call assert_equal(curpos[4], getcurpos()[4], 'run ' .. run)
|
||||
call assert_equal(curpos, getcurpos(), 'run ' .. run)
|
||||
|
||||
" No scroll when topline not equal to 1
|
||||
only | execute "norm gg5\<C-e>" | split | wincmd k
|
||||
|
||||
Reference in New Issue
Block a user