Browse files

Dropped the need for a tailing 'if' block.

  • Loading branch information...
1 parent 1138678 commit dfde886ec6417ccf4f76181befdee429c6878cfd @jalcine committed Feb 28, 2014
Showing with 3 additions and 5 deletions.
  1. +3 −5 autoload/cmake/targets.vim
View
8 autoload/cmake/targets.vim
@@ -58,6 +58,8 @@ func! cmake#targets#for_file(filepath)
return b:cmake_corresponding_target
endif
+ let b:cmake_corresponding_target = 0
+
for target in cmake#targets#list()
if exists("l:files")
unlet l:files
@@ -72,11 +74,7 @@ func! cmake#targets#for_file(filepath)
endif
endfor
- if exists("b:cmake_corresponding_target")
- return b:cmake_corresponding_target
- endif
-
- return 0
+ return b:cmake_corresponding_target
endfunc!
func! cmake#targets#files(target)

0 comments on commit dfde886

Please sign in to comment.