diff --git a/_vimrc b/_vimrc index ea110e2..09fadd3 100644 --- a/_vimrc +++ b/_vimrc @@ -59,6 +59,9 @@ noremap L g_ " Command wrapper that preserves the current window view. function! WithViewPreserved(command) + " Manully insert an undo block that preserves the current cursor position. + " https://github.com/rhysd/vim-clang-format/pull/55 + silent execute "noautocmd normal! ii\\"_x" let w = winsaveview() execute a:command call winrestview(w)