Commits

abudden  committed 2bdf30e

Moved filename creation into FindTypeFiles so that we can return multiple options.

  • Participants
  • Parent commits 2a66f94

Comments (0)

Files changed (1)

File autoload/TagHighlight/ReadTypes.vim

 		exe 'syn clear' group
 	endfor
 	
-	let type_files = TagHighlight#ReadTypes#FindTypeFiles(
-				\ TagHighlight#Option#GetOption('TypesFilePrefix',"types") . '_' .
-				\ a:suffix .
-				\ '.vim')
+	let type_files = TagHighlight#ReadTypes#FindTypeFiles(a:suffix)
 	for fname in type_files
 		exe 'so' fname
 	endfor
 	call winrestview(savedView)
 endfunction
 
-function! TagHighlight#ReadTypes#FindTypeFiles(filename)
+function! TagHighlight#ReadTypes#FindTypeFiles(suffix)
 	" TODO: Initial implementation only supports current directory
 	let results = []
-	if filereadable(a:filename)
-		let results += [a:filename]
+	let filename = TagHighlight#Option#GetOption('TypesFilePrefix',"types") . '_' .
+				\ a:suffix .
+				\ '.vim'
+	if filereadable(filename)
+		let results += [filename]
 	endif
 	return results
 endfunction