]> granicus.if.org Git - clang/commit
Make clang-format work in emacs buffers with unicode characters.
authorManuel Klimek <klimek@google.com>
Mon, 19 Jan 2015 10:48:04 +0000 (10:48 +0000)
committerManuel Klimek <klimek@google.com>
Mon, 19 Jan 2015 10:48:04 +0000 (10:48 +0000)
commitcd8cd4bd7e64d55aff27dbb747d47b56141ddb15
tree4e4a799318e00780a0ca4a7bdab5611c839b0434
parentf2625b150374529554a8a8cb226b9f150e48a785
Make clang-format work in emacs buffers with unicode characters.

Emacs functions by default use character positions; convert characters
to offsets when handing parameters to clang-format and convert byte
offsets we get from clang-format back to character positions.
Reworked the code a bit so the 0-based to 1-based offset calculations
are done in the same place where we do the multi-byte to offset mapping.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226445 91177308-0d34-0410-b5e6-96231b3b80d8
tools/clang-format/clang-format.el