Mercurial > vim
diff src/testdir/test_viminfo.vim @ 9313:c0760b25f31d v7.4.1939
commit https://github.com/vim/vim/commit/28607ba2b82668503f8406bc13690d59af46deb3
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 15 21:44:51 2016 +0200
patch 7.4.1939
Problem: Memory access error when reading viminfo. (Dominique Pelle)
Solution: Correct index in jumplist when at the end.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 15 Jun 2016 21:45:05 +0200 |
parents | 8000f0a44744 |
children | 1003973c99df |
line wrap: on
line diff
--- a/src/testdir/test_viminfo.vim +++ b/src/testdir/test_viminfo.vim @@ -322,6 +322,7 @@ func Test_viminfo_jumplist() clearjumps rviminfo Xviminfo + let last_line = line('.') exe "normal \<C-O>" call assert_equal('time 30', getline('.')) exe "normal \<C-O>" @@ -336,6 +337,20 @@ func Test_viminfo_jumplist() exe "normal \<C-O>" call assert_equal('time 05', getline('.')) + " Test with jumplist full. + clearjumps + call setline(1, repeat(['match here'], 101)) + call cursor(1, 1) + call test_settime(10) + for i in range(100) + exe "normal /here\r" + endfor + rviminfo Xviminfo + + " must be newest mark that comes from viminfo. + exe "normal \<C-O>" + call assert_equal(last_line, line('.')) + bwipe! call delete('Xviminfo') endfunc