Mercurial > vim
view src/testdir/test_tagjump.vim @ 10726:78927b31c73a v8.0.0253
patch 8.0.0253: error when loading session if winminheight is 2
commit https://github.com/vim/vim/commit/36ae89c550a4f0a380606c3fb4a054957ad698f0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 28 17:11:14 2017 +0100
patch 8.0.0253: error when loading session if winminheight is 2
Problem: When creating a session when winminheight is 2 or larger and
loading that session gives an error.
Solution: Also set winminheight before setting winheight to 1. (Rafael
Bodill, neovim #5717)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 Jan 2017 17:15:04 +0100 |
parents | 6bff81438f27 |
children | 0ecd07cd2e43 |
line wrap: on
line source
" Tests for tagjump (tags and special searches) " SEGV occurs in older versions. (At least 7.4.1748 or older) func Test_ptag_with_notagstack() set notagstack call assert_fails('ptag does_not_exist_tag_name', 'E426') set tagstack&vim endfunc func Test_cancel_ptjump() set tags=Xtags call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", \ "word\tfile1\tcmd1", \ "word\tfile2\tcmd2"], \ 'Xtags') only! call feedkeys(":ptjump word\<CR>\<CR>", "xt") help call assert_equal(2, winnr('$')) call delete('Xtags') quit endfunc func Test_static_tagjump() set tags=Xtags call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", \ "one\tXfile1\t/^one/;\"\tf\tfile:\tsignature:(void)", \ "word\tXfile2\tcmd2"], \ 'Xtags') new Xfile1 call setline(1, ['empty', 'one()', 'empty']) write tag one call assert_equal(2, line('.')) set tags& call delete('Xtags') call delete('Xfile1') bwipe! endfunc " Tests for [ CTRL-I and CTRL-W CTRL-I commands function Test_keyword_jump() call writefile(["#include Xinclude", "", \ "", \ "/* test text test tex start here", \ " some text", \ " test text", \ " start OK if found this line", \ " start found wrong line", \ "test text"], 'Xtestfile') call writefile(["/* test text test tex start here", \ " some text", \ " test text", \ " start OK if found this line", \ " start found wrong line", \ "test text"], 'Xinclude') new Xtestfile call cursor(1,1) call search("start") exe "normal! 5[\<C-I>" call assert_equal(" start OK if found this line", getline('.')) call cursor(1,1) call search("start") exe "normal! 5\<C-W>\<C-I>" call assert_equal(" start OK if found this line", getline('.')) enew! | only call delete('Xtestfile') call delete('Xinclude') endfunction " vim: shiftwidth=2 sts=2 expandtab