File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -2506,17 +2506,20 @@ endif
2506
2506
" Function called for testing all functions defined here. These are
2507
2507
" script-local, thus need to be executed here.
2508
2508
" Returns a string with error messages (hopefully empty).
2509
- func ! TestFiletypeFuncs (testlist)
2510
- let output = ' '
2511
- for f in a: testlist
2512
- try
2513
- exe f
2514
- catch
2515
- let output = output . " \n " . f . " : " . v: exception
2516
- endtry
2517
- endfor
2518
- return output
2519
- endfunc
2509
+ " Check if function exists first. See https://github.com/vim/vim/issues/9890
2510
+ if ! exists (" *TestFiletypeFuncs" )
2511
+ func ! TestFiletypeFuncs (testlist)
2512
+ let output = ' '
2513
+ for f in a: testlist
2514
+ try
2515
+ exe f
2516
+ catch
2517
+ let output = output . " \n " . f . " : " . v: exception
2518
+ endtry
2519
+ endfor
2520
+ return output
2521
+ endfunc
2522
+ endif
2520
2523
2521
2524
" Restore 'cpoptions'
2522
2525
let &cpo = s: cpo_save
You can’t perform that action at this time.
0 commit comments