commit | e5591550ee91df9f70d1dc5ba047cfa2e54e18b9 | [log] [tgz] |
---|---|---|
author | Bill Wendling <morbo@google.com> | Sat Apr 11 14:35:49 2015 -0400 |
committer | Bill Wendling <morbo@google.com> | Sat Apr 11 14:35:49 2015 -0400 |
tree | 804c44023a4a8fa78b8c59185c919eacacf73277 | |
parent | 2b3931daf556f12f5ebfaa965d18e73e202d62f5 [diff] |
Clear out the buffer before replacing it.
diff --git a/plugins/yapf.vim b/plugins/yapf.vim index cdbb048..24b3510 100644 --- a/plugins/yapf.vim +++ b/plugins/yapf.vim
@@ -29,6 +29,7 @@ let l:formatted_text = system(l:cmd, join(getline(1, '$'), "\n") . "\n") " Update the buffer. + execute '1,' . string(line('$')) . 'delete' call setline(1, split(l:formatted_text, "\n")) " Reset cursor to first line of the formatted range.