[PATCH] D22351: [include-fixer] Move cursor to #include line in vim after inserting a missing header.
Daniel Jasper via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 15 00:34:23 PDT 2016
djasper added a comment.
FWIW, I think I'd like this behavior as it shows me what is actually being done. I can undo/redo to double-check or C-O to get back to where I was. Of course making it configurable seems like the right thing to do.
Comment at: include-fixer/tool/clang-include-fixer.py:102
@@ +101,3 @@
+ # Set cursor to the #include line.
+ include_header = "#include " + header["HeaderInfos"]["Header"]
+ line_num = lines.index(include_header) + 1
Seems seems very hacky. Can't you extract it out of the diff sequence above?
More information about the cfe-commits