forked from OSchip/llvm-project
Attempt to make clang-format.py python 3 - compatible.
llvm-svn: 285301
This commit is contained in:
parent
d4cd37faca
commit
115d225cf1
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue