diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-06-21 22:54:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-21 22:54:08 +0200 |
| commit | cf659a19260aea27816575d67a12139ebaada56f (patch) | |
| tree | 699f705b09fc56af06ac155fb95e10675fefa526 /src/nvim/testdir | |
| parent | 7ae7da8fb9ab2e23ffc19000798ae27a2dee4e87 (diff) | |
| parent | 10083ec4cc6d8f03831445831a20c82fee87880b (diff) | |
| download | rneovim-cf659a19260aea27816575d67a12139ebaada56f.tar.gz rneovim-cf659a19260aea27816575d67a12139ebaada56f.tar.bz2 rneovim-cf659a19260aea27816575d67a12139ebaada56f.zip | |
Merge #8612 from janlazo/vim-8.0.0621
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_tagjump.vim | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim index d5ce193bc6..dbab8d9e26 100644 --- a/src/nvim/testdir/test_tagjump.vim +++ b/src/nvim/testdir/test_tagjump.vim @@ -65,6 +65,48 @@ func Test_duplicate_tagjump() call delete('Xfile1') endfunc +func Test_tagjump_switchbuf() + set tags=Xtags + call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", + \ "second\tXfile1\t2", + \ "third\tXfile1\t3",], + \ 'Xtags') + call writefile(['first', 'second', 'third'], 'Xfile1') + + enew | only + set switchbuf= + stag second + call assert_equal(2, winnr('$')) + call assert_equal(2, line('.')) + stag third + call assert_equal(3, winnr('$')) + call assert_equal(3, line('.')) + + enew | only + set switchbuf=useopen + stag second + call assert_equal(2, winnr('$')) + call assert_equal(2, line('.')) + stag third + call assert_equal(2, winnr('$')) + call assert_equal(3, line('.')) + + enew | only + set switchbuf=usetab + tab stag second + call assert_equal(2, tabpagenr('$')) + call assert_equal(2, line('.')) + 1tabnext | stag third + call assert_equal(2, tabpagenr('$')) + call assert_equal(3, line('.')) + + tabclose! + enew | only + call delete('Xfile1') + call delete('Xtags') + set switchbuf&vim +endfunc + " Tests for [ CTRL-I and CTRL-W CTRL-I commands function Test_keyword_jump() call writefile(["#include Xinclude", "", |