]> granicus.if.org Git - clang/commitdiff
clang-format: Fix vim integration if g:clang_format_binary doesn't exist
authorDaniel Jasper <djasper@google.com>
Tue, 4 Nov 2014 10:40:26 +0000 (10:40 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 4 Nov 2014 10:40:26 +0000 (10:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221254 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-format/clang-format.py

index 03493560f43bd64ac6fb95d9afb1f80900fd193d..a79205a6dfe83f3291aefbfd158448200b18bfc4 100644 (file)
@@ -26,7 +26,7 @@ import vim
 # set g:clang_format_path to the path to clang-format if it is not on the path
 # Change this to the full path if clang-format is not on the path.
 binary = 'clang-format'
-if vim.eval('exists("g:clang_format_path")'):
+if vim.eval('exists("g:clang_format_path")') == "1":
   binary = vim.eval('g:clang_format_path')
 
 # Change this to format according to other formatting styles. See the output of