Mercurial > vim
comparison src/testdir/test_tagjump.vim @ 10611:6bff81438f27 v8.0.0195
patch 8.0.0195: fail to jump to static tag in current file
commit https://github.com/vim/vim/commit/a9d23c20879d0dcb289a4db54b3c7df060f87c3c
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 16 20:53:34 2017 +0100
patch 8.0.0195: fail to jump to static tag in current file
Problem: Jumping to a tag that is a static item in the current file fails.
(Kazunobu Kuriyama)
Solution: Make sure the first byte of the tag key is not NUL. (Suggested by
James McCoy, closes #1387)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 16 Jan 2017 21:00:04 +0100 |
parents | eb9a7296ae9f |
children | 0ecd07cd2e43 |
comparison
equal
deleted
inserted
replaced
10610:02610b4928a2 | 10611:6bff81438f27 |
---|---|
19 help | 19 help |
20 call assert_equal(2, winnr('$')) | 20 call assert_equal(2, winnr('$')) |
21 | 21 |
22 call delete('Xtags') | 22 call delete('Xtags') |
23 quit | 23 quit |
24 endfunc | |
25 | |
26 func Test_static_tagjump() | |
27 set tags=Xtags | |
28 call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", | |
29 \ "one\tXfile1\t/^one/;\"\tf\tfile:\tsignature:(void)", | |
30 \ "word\tXfile2\tcmd2"], | |
31 \ 'Xtags') | |
32 new Xfile1 | |
33 call setline(1, ['empty', 'one()', 'empty']) | |
34 write | |
35 tag one | |
36 call assert_equal(2, line('.')) | |
37 | |
38 set tags& | |
39 call delete('Xtags') | |
40 call delete('Xfile1') | |
41 bwipe! | |
24 endfunc | 42 endfunc |
25 | 43 |
26 " Tests for [ CTRL-I and CTRL-W CTRL-I commands | 44 " Tests for [ CTRL-I and CTRL-W CTRL-I commands |
27 function Test_keyword_jump() | 45 function Test_keyword_jump() |
28 call writefile(["#include Xinclude", "", | 46 call writefile(["#include Xinclude", "", |