Attempt to make clang-format.py python 3 - compatible.

llvm-svn: 285301
This commit is contained in:
Alexander Kornienko 2016-10-27 15:15:23 +00:00
parent d4cd37faca
commit 115d225cf1
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ if vim.eval('exists("g:clang_format_fallback_style")') == "1":
def main(): def main():
# Get the current text. # Get the current text.
encoding = vim.eval("&encoding") encoding = vim.eval("&encoding")
buf = [ unicode(line, encoding) for line in vim.current.buffer ] buf = [ line.decode(encoding) for line in vim.current.buffer ]
text = '\n'.join(buf) text = '\n'.join(buf)
# Determine range to format. # Determine range to format.