From a79c0c8f7a8bb09a5d3eda9799851e271e986579 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 2 Apr 2019 22:15:54 +0200 Subject: vim-patch:8.1.1100: tag file without trailing newline no longer works Problem: Tag file without trailing newline no longer works. (Marco Hinz) Solution: Don't expect a newline at the end of the file. https://github.com/vim/vim/commit/fd700393becfc35b6fad305221265b87a8564ddb --- src/nvim/testdir/test_taglist.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_taglist.vim b/src/nvim/testdir/test_taglist.vim index 3ad2025915..f4e939254a 100644 --- a/src/nvim/testdir/test_taglist.vim +++ b/src/nvim/testdir/test_taglist.vim @@ -61,3 +61,16 @@ func Test_tags_too_long() call assert_fails('tag ' . repeat('x', 1020), 'E426') tags endfunc + +" For historical reasons we support a tags file where the last line is missing +" the newline. +func Test_tagsfile_without_trailing_newline() + call writefile(["Foo\tfoo\t1"], 'Xtags', 'b') + set tags=Xtags + + let tl = taglist('.*') + call assert_equal(1, len(tl)) + call assert_equal('Foo', tl[0].name) + + call delete('Xtags') +endfunc -- cgit