mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
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:
parent
48f83c31d1
commit
bf40e90dfe
@ -811,11 +811,11 @@ endfunc
|
|||||||
|
|
||||||
" Test for an unsorted tags file
|
" Test for an unsorted tags file
|
||||||
func Test_tag_sort()
|
func Test_tag_sort()
|
||||||
call writefile([
|
let l = [
|
||||||
\ "first\tXfoo\t1",
|
\ "first\tXfoo\t1",
|
||||||
\ "ten\tXfoo\t3",
|
\ "ten\tXfoo\t3",
|
||||||
\ "six\tXfoo\t2"],
|
\ "six\tXfoo\t2"]
|
||||||
\ 'Xtags')
|
call writefile(l, 'Xtags')
|
||||||
set tags=Xtags
|
set tags=Xtags
|
||||||
let code =<< trim [CODE]
|
let code =<< trim [CODE]
|
||||||
int first() {}
|
int first() {}
|
||||||
@ -826,7 +826,14 @@ func Test_tag_sort()
|
|||||||
|
|
||||||
call assert_fails('tag first', 'E432:')
|
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('Xtags')
|
||||||
|
call delete('Xtags2')
|
||||||
call delete('Xfoo')
|
call delete('Xfoo')
|
||||||
set tags&
|
set tags&
|
||||||
%bwipe
|
%bwipe
|
||||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4538,
|
||||||
/**/
|
/**/
|
||||||
4537,
|
4537,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user