r221254 - clang-format: Fix vim integration if g:clang_format_binary doesn't exist

Daniel Jasper djasper at google.com
Tue Nov 4 02:40:27 PST 2014


Author: djasper
Date: Tue Nov  4 04:40:26 2014
New Revision: 221254

URL: http://llvm.org/viewvc/llvm-project?rev=221254&view=rev
Log:
clang-format: Fix vim integration if g:clang_format_binary doesn't exist

Modified:
    cfe/trunk/tools/clang-format/clang-format.py

Modified: cfe/trunk/tools/clang-format/clang-format.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format.py?rev=221254&r1=221253&r2=221254&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/clang-format.py (original)
+++ cfe/trunk/tools/clang-format/clang-format.py Tue Nov  4 04:40:26 2014
@@ -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





More information about the cfe-commits mailing list