]> granicus.if.org Git - clang/commitdiff
[clang-format] Fix lines regression in clang-format.py
authorKrasimir Georgiev <krasimir@google.com>
Tue, 22 Aug 2017 14:28:01 +0000 (14:28 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Tue, 22 Aug 2017 14:28:01 +0000 (14:28 +0000)
Summary:
This patch fixes a regression after https://reviews.llvm.org/rL305665,
which updates the structure of the `lines` variable.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D37011

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311456 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-format/clang-format.py

index 2412566346f247e470473a63a54e4bfa5b61af77..187125ed09a8fc9e003e1301a7f5bce5b2d9beb3 100644 (file)
@@ -62,7 +62,7 @@ def main():
 
   # Determine range to format.
   if vim.eval('exists("l:lines")') == '1':
-    lines = vim.eval('l:lines')
+    lines = ['-lines', vim.eval('l:lines')]
   elif vim.eval('exists("l:formatdiff")') == '1':
     with open(vim.current.buffer.name, 'r') as f:
       ondisk = f.read().splitlines();