diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-05 20:35:44 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-05 20:35:44 +0100 |
commit | 830c1afc9d2cd5819a05c71d4e0b1f748a8c0519 (patch) | |
tree | 6ce97c03e711c4017898dd209e596cb04dc43795 /src/testdir/test_ins_complete.vim | |
parent | 61d7c0d52ca40ab8488c36e619d1e46503affd0b (diff) | |
download | vim-git-830c1afc9d2cd5819a05c71d4e0b1f748a8c0519.tar.gz |
patch 8.2.0088: insufficient tests for tags; bug in using extra tag fieldv8.2.0088
Problem: Insufficient tests for tags; bug in using extra tag field when
using an ex command to position the cursor.
Solution: Fix the bug, add more tests. (Yegappan Lakshmanan, closes #5439)
Diffstat (limited to 'src/testdir/test_ins_complete.vim')
-rw-r--r-- | src/testdir/test_ins_complete.vim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index bec6ffc6f..c9d93ceb1 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -432,3 +432,31 @@ func Test_pum_with_preview_win() call StopVimInTerminal(buf) call delete('Xpreviewscript') endfunc + +" Test for inserting the tag search pattern in insert mode +func Test_ins_compl_tag_sft() + call writefile([ + \ "!_TAG_FILE_ENCODING\tutf-8\t//", + \ "first\tXfoo\t/^int first() {}$/", + \ "second\tXfoo\t/^int second() {}$/", + \ "third\tXfoo\t/^int third() {}$/"], + \ 'Xtags') + set tags=Xtags + let code =<< trim [CODE] + int first() {} + int second() {} + int third() {} + [CODE] + call writefile(code, 'Xfoo') + + enew + set showfulltag + exe "normal isec\<C-X>\<C-]>\<C-N>\<CR>" + call assert_equal('int second() {}', getline(1)) + set noshowfulltag + + call delete('Xtags') + call delete('Xfoo') + set tags& + %bwipe! +endfunc |