mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
vim-patch:9.0.1599: Cursor not adjusted when 'splitkeep' is not "cursor" (#23884)
Problem: Cursor not adjusted when near top or bottom of window and
'splitkeep' is not "cursor".
Solution: Move boundary checks to outer cursor move functions, inner
functions should only return valid cursor positions. (Luuk van
Baal, closes vim/vim#12480)
a109f39ef5
This commit is contained in:
@@ -1763,9 +1763,20 @@ endfunc
|
||||
|
||||
func Test_splitkeep_misc()
|
||||
set splitkeep=screen
|
||||
set splitbelow
|
||||
|
||||
call setline(1, range(1, &lines))
|
||||
" Cursor is adjusted to start and end of buffer
|
||||
norm M
|
||||
wincmd s
|
||||
resize 1
|
||||
call assert_equal(1, line('.'))
|
||||
wincmd j
|
||||
norm GM
|
||||
resize 1
|
||||
call assert_equal(&lines, line('.'))
|
||||
only!
|
||||
|
||||
set splitbelow
|
||||
norm Gzz
|
||||
let top = line('w0')
|
||||
" No scroll when aucmd_win is opened
|
||||
|
Reference in New Issue
Block a user