[clang-tools-extra] r271266 - Make the vim integration output a bit prettier and drop the -debug flag.

Benjamin Kramer via cfe-commits cfe-commits at lists.llvm.org
Tue May 31 04:29:29 PDT 2016


Author: d0k
Date: Tue May 31 06:28:34 2016
New Revision: 271266

URL: http://llvm.org/viewvc/llvm-project?rev=271266&view=rev
Log:
Make the vim integration output a bit prettier and drop the -debug flag.

Modified:
    clang-tools-extra/trunk/include-fixer/tool/clang-include-fixer.py

Modified: clang-tools-extra/trunk/include-fixer/tool/clang-include-fixer.py
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/tool/clang-include-fixer.py?rev=271266&r1=271265&r2=271266&view=diff
==============================================================================
--- clang-tools-extra/trunk/include-fixer/tool/clang-include-fixer.py (original)
+++ clang-tools-extra/trunk/include-fixer/tool/clang-include-fixer.py Tue May 31 06:28:34 2016
@@ -36,7 +36,7 @@ if vim.eval('exists("g:clang_include_fix
 
 def ShowDialog(message, choices, default_choice_index=0):
   to_eval = "confirm('{0}', '{1}', '{2}')".format(message,
-                                                  choices,
+                                                  choices.strip(),
                                                   default_choice_index)
   return int(vim.eval(to_eval));
 
@@ -74,8 +74,8 @@ def main():
   text = '\n'.join(buf)
 
   # Run command to get all headers.
-  command = [binary, "-stdin", "-output-headers", "-db="+args.db, "-input="+args.input, "-debug",
-             vim.current.buffer.name]
+  command = [binary, "-stdin", "-output-headers", "-db="+args.db,
+             "-input="+args.input, vim.current.buffer.name]
   stdout, stderr = execute(command, text)
   lines = stdout.splitlines()
   if len(lines) < 2:
@@ -93,7 +93,7 @@ def main():
   choices_message = ""
   index = 1;
   for header in lines[1:1+maximum_suggested_headers]:
-    choices_message += "&" + str(index) + header + "\n"
+    choices_message += "&{0} {1}\n".format(index, header)
     index += 1
 
   select = ShowDialog("choose a header file for {0}.".format(symbol),




More information about the cfe-commits mailing list