summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_tagjump.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_tagjump.vim')
-rw-r--r--src/testdir/test_tagjump.vim40
1 files changed, 39 insertions, 1 deletions
diff --git a/src/testdir/test_tagjump.vim b/src/testdir/test_tagjump.vim
index 71237855c9..c2419375a0 100644
--- a/src/testdir/test_tagjump.vim
+++ b/src/testdir/test_tagjump.vim
@@ -975,8 +975,46 @@ func Test_tag_stack()
call assert_equal(0, t.length)
call assert_equal(1, t.curidx)
+ " References to wiped buffer are deleted with multiple tabpages.
+ let w1 = win_getid()
+ call settagstack(1, {'items' : []})
+ for i in range(10, 20) | edit Xtest | exe "tag var" .. i | endfor
+ enew
+
+ new
+ let w2 = win_getid()
+ call settagstack(1, {'items' : []})
+ for i in range(10, 20) | edit Xtest | exe "tag var" .. i | endfor
+ enew
+
+ tabnew
+ let w3 = win_getid()
+ call settagstack(1, {'items' : []})
+ for i in range(10, 20) | edit Xtest | exe "tag var" .. i | endfor
+ enew
+
+ new
+ let w4 = win_getid()
+ call settagstack(1, {'items' : []})
+ for i in range(10, 20) | edit Xtest | exe "tag var" .. i | endfor
+ enew
+
+ for w in [w1, w2, w3, w4]
+ let t = gettagstack(w)
+ call assert_equal(11, t.length)
+ call assert_equal(12, t.curidx)
+ endfor
+
+ bwipe! Xtest
+
+ for w in [w1, w2, w3, w4]
+ let t = gettagstack(w)
+ call assert_equal(0, t.length)
+ call assert_equal(1, t.curidx)
+ endfor
+
+ %bwipe!
set tags&
- %bwipe
endfunc
" Test for browsing multiple matching tags