mirror of
https://github.com/neovim/neovim.git
synced 2026-03-26 18:31:59 +00:00
vim-patch:8.1.2140: "gk" and "gj" do not work correctly in number column #11208
Problem: "gk" and "gj" do not work correctly in number column.
Solution: Allow for a negative "curswant". (Zach Wegner, closes vim/vim#4969)
ceba3dd518
This commit is contained in:
committed by
Justin M. Keyes
parent
94bda2fec8
commit
0785f8e8b1
@@ -2813,4 +2813,29 @@ func Test_normal_gk()
|
||||
call assert_equal(95, virtcol('.'))
|
||||
bw!
|
||||
bw!
|
||||
|
||||
" needs 80 column new window
|
||||
new
|
||||
vert 80new
|
||||
set number
|
||||
set numberwidth=10
|
||||
set cpoptions+=n
|
||||
put =[repeat('0',90), repeat('1',90)]
|
||||
norm! 075l
|
||||
call assert_equal(76, col('.'))
|
||||
norm! gk
|
||||
call assert_equal(1, col('.'))
|
||||
norm! gk
|
||||
call assert_equal(76, col('.'))
|
||||
norm! gk
|
||||
call assert_equal(1, col('.'))
|
||||
norm! gj
|
||||
call assert_equal(76, col('.'))
|
||||
norm! gj
|
||||
call assert_equal(1, col('.'))
|
||||
norm! gj
|
||||
call assert_equal(76, col('.'))
|
||||
bw!
|
||||
bw!
|
||||
set cpoptions& number& numberwidth&
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user