1
0
forked from aniani/vim

patch 8.2.4538: the find_tags_in_file() function is too long

Problem:    The find_tags_in_file() function is too long.
Solution:   Refactor into smaller functions. (Yegappan Lakshmanan,
            closes #9920)
This commit is contained in:
Yegappan Lakshmanan 2022-03-10 18:36:54 +00:00 committed by Bram Moolenaar
parent 48f83c31d1
commit bf40e90dfe
3 changed files with 753 additions and 635 deletions

1373
src/tag.c

File diff suppressed because it is too large Load Diff

View File

@ -811,11 +811,11 @@ endfunc
" Test for an unsorted tags file
func Test_tag_sort()
call writefile([
let l = [
\ "first\tXfoo\t1",
\ "ten\tXfoo\t3",
\ "six\tXfoo\t2"],
\ 'Xtags')
\ "six\tXfoo\t2"]
call writefile(l, 'Xtags')
set tags=Xtags
let code =<< trim [CODE]
int first() {}
@ -826,7 +826,14 @@ func Test_tag_sort()
call assert_fails('tag first', 'E432:')
" When multiple tag files are not sorted, then message should be displayed
" multiple times
call writefile(l, 'Xtags2')
set tags=Xtags,Xtags2
call assert_fails('tag first', ['E432:', 'E432:'])
call delete('Xtags')
call delete('Xtags2')
call delete('Xfoo')
set tags&
%bwipe

View File

@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4538,
/**/
4537,
/**/