Mercurial > vim
diff src/testdir/test_normal.vim @ 18291:11f68eb58fda v8.1.2140
patch 8.1.2140: "gk" and "gj" do not work correctly in number column
Commit: https://github.com/vim/vim/commit/ceba3dd5187788e09f65bd41b07b40f6f9aab953
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 12 16:12:54 2019 +0200
patch 8.1.2140: "gk" and "gj" do not work correctly in number column
Problem: "gk" and "gj" do not work correctly in number column.
Solution: Allow for a negative "curswant". (Zach Wegner, closes https://github.com/vim/vim/issues/4969)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 12 Oct 2019 16:15:03 +0200 |
parents | 5e10ee16f4b4 |
children | 0eeaa9a6e4e7 |
line wrap: on
line diff
--- a/src/testdir/test_normal.vim +++ b/src/testdir/test_normal.vim @@ -2654,4 +2654,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