summaryrefslogtreecommitdiffstats
path: root/autoload/rustfmt.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-09-04 15:44:43 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2019-09-04 15:44:43 +0200
commit664aa988f6d9cdb7b75218666fbe348c85ef8b29 (patch)
tree306173199576430e6133a1ed137bd80bbc2fb01b /autoload/rustfmt.vim
parent3ddca5da461ebfaa82104f82e3cbf19d1c326ade (diff)
downloadvim-polyglot-664aa988f6d9cdb7b75218666fbe348c85ef8b29.tar.gz
vim-polyglot-664aa988f6d9cdb7b75218666fbe348c85ef8b29.zip
Update
Diffstat (limited to 'autoload/rustfmt.vim')
-rw-r--r--autoload/rustfmt.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/autoload/rustfmt.vim b/autoload/rustfmt.vim
index 908eb325..f469ac13 100644
--- a/autoload/rustfmt.vim
+++ b/autoload/rustfmt.vim
@@ -246,7 +246,12 @@ function! rustfmt#PreWrite()
if rust#GetConfigVar('rustfmt_autosave_if_config_present', 0)
if findfile('rustfmt.toml', '.;') !=# '' || findfile('.rustfmt.toml', '.;') !=# ''
let b:rustfmt_autosave = 1
- let b:rustfmt_autosave_because_of_config = 1
+ let b:_rustfmt_autosave_because_of_config = 1
+ endif
+ else
+ if has_key(b:, '_rustfmt_autosave_because_of_config')
+ unlet b:_rustfmt_autosave_because_of_config
+ unlet b:rustfmt_autosave
endif
endif