diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-14 11:22:42 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-15 01:27:30 -0400 |
commit | 1daf2cb0eaa21a88656332eec4a2dbf8b824c634 (patch) | |
tree | 2bf2c8918eef58b83d5b368b6140cbc74b4fa63d | |
parent | 5e38ff105c20bc3920e840046f6af651c99f186c (diff) | |
download | rneovim-1daf2cb0eaa21a88656332eec4a2dbf8b824c634.tar.gz rneovim-1daf2cb0eaa21a88656332eec4a2dbf8b824c634.tar.bz2 rneovim-1daf2cb0eaa21a88656332eec4a2dbf8b824c634.zip |
vim-patch:8.0.1488: emacs tags no longer work
Problem: Emacs tags no longer work. (zdohnal)
Solution: Do not skip over end of line.
https://github.com/vim/vim/commit/0d2073773218736e368786f0db7024bd9b9e7912
-rw-r--r-- | src/nvim/tag.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_tagjump.vim | 28 |
2 files changed, 29 insertions, 1 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 02dc36b57a..3b87fcb878 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -2223,7 +2223,7 @@ static size_t matching_line_len(const char_u *const lbuf) const char_u *p = lbuf + 1; // does the same thing as parse_match() - p += STRLEN(p) + 2; + p += STRLEN(p) + 1; return (p - lbuf) + STRLEN(p); } diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim index 268a153077..f9bd8b5246 100644 --- a/src/nvim/testdir/test_tagjump.vim +++ b/src/nvim/testdir/test_tagjump.vim @@ -230,4 +230,32 @@ func Test_tag_file_encoding() call delete('Xtags1') endfunc +func Test_tagjump_etags() + if !has('emacs_tags') + return + endif + call writefile([ + \ "void foo() {}", + \ "int main(int argc, char **argv)", + \ "{", + \ "\tfoo();", + \ "\treturn 0;", + \ "}", + \ ], 'Xmain.c') + + call writefile([ + \ "\x0c", + \ "Xmain.c,64", + \ "void foo() {}\x7ffoo\x011,0", + \ "int main(int argc, char **argv)\x7fmain\x012,14", + \ ], 'Xtags') + set tags=Xtags + ta foo + call assert_equal('void foo() {}', getline('.')) + + call delete('Xtags') + call delete('Xmain.c') + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |