Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Commit

Permalink
Dropped the need for a tailing 'if' block.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacky Alciné committed Feb 28, 2014
1 parent 1138678 commit dfde886
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions autoload/cmake/targets.vim
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit dfde886

Please sign in to comment.