summaryrefslogtreecommitdiffstats
path: root/autoload/rustfmt.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-09-22 17:16:27 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-09-22 17:16:27 +0200
commit6f0c50457f9d197c1a1759d4302f251cce4242d8 (patch)
treed935fca3ffab9e0a25fe062513095f968871fc77 /autoload/rustfmt.vim
parent06548fe61765d8a68a289741ce8d30f04a037e60 (diff)
downloadvim-polyglot-6f0c50457f9d197c1a1759d4302f251cce4242d8.tar.gz
vim-polyglot-6f0c50457f9d197c1a1759d4302f251cce4242d8.zip
Build
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)