From 6f0c50457f9d197c1a1759d4302f251cce4242d8 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 22 Sep 2020 17:16:27 +0200 Subject: Build --- autoload/rustfmt.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'autoload/rustfmt.vim') 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) -- cgit v1.2.3