diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-10 18:53:20 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-10 18:53:20 +1200 |
commit | adc20852d678328fdb9efa8cbb08a5c36ebb2018 (patch) | |
tree | 33af6e8f572377cb0d854546e38e792edd74f753 | |
parent | Merge branch 'release/v2.1.0' (diff) | |
download | vim-write-mkpath-adc20852d678328fdb9efa8cbb08a5c36ebb2018.tar.gz vim-write-mkpath-adc20852d678328fdb9efa8cbb08a5c36ebb2018.zip |
Block out :file call on Windows
It raises swap file conflict warnings, and doesn't seem to be otherwise
needed.
-rw-r--r-- | autoload/write_mkpath.vim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/autoload/write_mkpath.vim b/autoload/write_mkpath.vim index 7610b87..2503651 100644 --- a/autoload/write_mkpath.vim +++ b/autoload/write_mkpath.vim @@ -30,8 +30,11 @@ function! write_mkpath#(path) abort call mkdir(dir, 'p') " Prod Vim into realising the buffer's directory exists now, so that a - " subsequent change of working directory doesn't break it - silent keepalt file % + " subsequent change of working directory doesn't break it; this doesn't + " appear to be necessary on Windows, for reasons unclear + if !has('win32') && !has('win64') + silent keepalt file % + endif " Re-run the BufWritePre hooks, now that the directory exists and a useable " filename has been set; this will start this function again from the top, |