From a55b6aa3aa797c989a4979a13a5bd2ae11cfd4a5 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 29 Mar 2019 20:30:36 +0100 Subject: Remove grapqhl, fixes #387 --- autoload/rustfmt.vim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'autoload/rustfmt.vim') diff --git a/autoload/rustfmt.vim b/autoload/rustfmt.vim index 59ab3d3b..96fffb26 100644 --- a/autoload/rustfmt.vim +++ b/autoload/rustfmt.vim @@ -234,6 +234,9 @@ function! rustfmt#Cmd() endfunction function! rustfmt#PreWrite() + if !filereadable(expand("%@")) + return + endif if rust#GetConfigVar('rustfmt_autosave_if_config_present', 0) if findfile('rustfmt.toml', '.;') !=# '' || findfile('.rustfmt.toml', '.;') !=# '' let b:rustfmt_autosave = 1 -- cgit v1.2.3