Fix autosave for non-file buffers
This commit is contained in:
parent
01624e0c71
commit
a7c32a1167
1 changed files with 2 additions and 4 deletions
|
@ -1,12 +1,10 @@
|
||||||
" Extend autosavefeature :)
|
" Extend autosavefeature :)
|
||||||
|
|
||||||
function! TryAutosave()
|
function! TryAutosave()
|
||||||
if &autowriteall
|
if &autowriteall && &mod && &buftype==""
|
||||||
if &mod
|
|
||||||
silent write
|
silent write
|
||||||
redraw
|
redraw
|
||||||
end
|
end
|
||||||
end
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if exists("$AUTOSAVE")
|
if exists("$AUTOSAVE")
|
||||||
|
|
Loading…
Reference in a new issue