summaryrefslogtreecommitdiffstats
path: root/autoload/rustfmt.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/rustfmt.vim')
-rw-r--r--autoload/rustfmt.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/rustfmt.vim b/autoload/rustfmt.vim
index 60e2029e..28cca07a 100644
--- a/autoload/rustfmt.vim
+++ b/autoload/rustfmt.vim
@@ -109,7 +109,7 @@ function! s:DeleteLines(start, end) abort
endfunction
function! s:RunRustfmt(command, tmpname, from_writepre)
- mkview!
+ let l:view = winsaveview()
let l:stderr_tmpname = tempname()
call writefile([], l:stderr_tmpname)
@@ -215,7 +215,7 @@ function! s:RunRustfmt(command, tmpname, from_writepre)
lwindow
endif
- silent! loadview
+ call winrestview(l:view)
endfunction
function! rustfmt#FormatRange(line1, line2)