mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
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.
0d20737732
This commit is contained in:
@@ -2223,7 +2223,7 @@ static size_t matching_line_len(const char_u *const lbuf)
|
|||||||
const char_u *p = lbuf + 1;
|
const char_u *p = lbuf + 1;
|
||||||
|
|
||||||
// does the same thing as parse_match()
|
// does the same thing as parse_match()
|
||||||
p += STRLEN(p) + 2;
|
p += STRLEN(p) + 1;
|
||||||
return (p - lbuf) + STRLEN(p);
|
return (p - lbuf) + STRLEN(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -230,4 +230,32 @@ func Test_tag_file_encoding()
|
|||||||
call delete('Xtags1')
|
call delete('Xtags1')
|
||||||
endfunc
|
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
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
Reference in New Issue
Block a user