mirror of
https://github.com/neovim/neovim.git
synced 2026-08-03 14:19:15 +00:00
vim-patch:8.0.0499
Problem: taglist() does not prioritize tags for a buffer.
Solution: Add an optional buffer argument. (Duncan McDougall, closes vim/vim#1194)
c6aafbaf3e
This commit is contained in:
@@ -26,6 +26,7 @@ source test_tabline.vim
|
||||
" source test_tabpage.vim
|
||||
source test_tagcase.vim
|
||||
source test_tagjump.vim
|
||||
source test_taglist.vim
|
||||
source test_true_false.vim
|
||||
source test_unlet.vim
|
||||
source test_utf8.vim
|
||||
|
||||
21
src/nvim/testdir/test_taglist.vim
Normal file
21
src/nvim/testdir/test_taglist.vim
Normal file
@@ -0,0 +1,21 @@
|
||||
" test 'taglist' function
|
||||
|
||||
func Test_taglist()
|
||||
call writefile([
|
||||
\ "FFoo\tXfoo\t1",
|
||||
\ "FBar\tXfoo\t2",
|
||||
\ "BFoo\tXbar\t1",
|
||||
\ "BBar\tXbar\t2"
|
||||
\ ], 'Xtags')
|
||||
set tags=Xtags
|
||||
split Xtext
|
||||
|
||||
call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo"), {i, v -> v.name}))
|
||||
call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xtext"), {i, v -> v.name}))
|
||||
call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xfoo"), {i, v -> v.name}))
|
||||
call assert_equal(['BFoo', 'FFoo'], map(taglist("Foo", "Xbar"), {i, v -> v.name}))
|
||||
|
||||
call delete('Xtags')
|
||||
bwipe
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user