From bd80bbd3c36cc0bddf339809b85a6fa93b72cbc6 Mon Sep 17 00:00:00 2001 From: Kirill Bobyrev Date: Mon, 26 Sep 2016 07:26:32 +0000 Subject: [PATCH] [clang-rename] Use checktime when reloading vim buffer after applying clang-rename After applying `clang-rename` to a vim buffer (using `clang-rename.py` as part of the vim integration) the buffer gets reloaded using `bufdo`. This solution is suboptimal, since syntax highlighting is turned off for performance reasons and never turned on, after all changes to the source file have been applied. A better solution to this is using `checktime`. It is exactly designed for this kind of task and doesn't have the syntax highlighting issue. Patch by Kai Wolf! Reviewers: omtcyfz Differential Revision: https://reviews.llvm.org/D24791 llvm-svn: 282388 --- clang-tools-extra/clang-rename/tool/clang-rename.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang-tools-extra/clang-rename/tool/clang-rename.py b/clang-tools-extra/clang-rename/tool/clang-rename.py index 20530c3..3cc6644 100644 --- a/clang-tools-extra/clang-rename/tool/clang-rename.py +++ b/clang-tools-extra/clang-rename/tool/clang-rename.py @@ -54,7 +54,7 @@ def main(): print stderr # Reload all buffers in Vim. - vim.command("bufdo edit") + vim.command("checktime") if __name__ == '__main__': -- 2.7.4