summaryrefslogtreecommitdiffstats
path: root/autoload/rustfmt.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-03-29 20:30:36 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2019-03-29 20:30:36 +0100
commita55b6aa3aa797c989a4979a13a5bd2ae11cfd4a5 (patch)
tree0ec7670cabfdf1b5fa3545cee9ee9d6ca7c8ad32 /autoload/rustfmt.vim
parent1d45a6d4f094127b113470d7710695b280224933 (diff)
downloadvim-polyglot-3.7.1.tar.gz
vim-polyglot-3.7.1.zip
Remove grapqhl, fixes #387v3.7.1
Diffstat (limited to 'autoload/rustfmt.vim')
-rw-r--r--autoload/rustfmt.vim3
1 files changed, 3 insertions, 0 deletions
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