aboutsummaryrefslogtreecommitdiff
path: root/autoload/write_mkpath.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-01 18:56:16 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-01 18:56:16 +1200
commit5343f325d4214a2272ccf35af13716e5a8bd212e (patch)
treed2ee14c354cd04767c6ba06e749a5e102a9f4183 /autoload/write_mkpath.vim
parentMerge branch 'release/v2.0.0' into develop (diff)
parentBump VERSION (diff)
downloadvim-write-mkpath-5343f325d4214a2272ccf35af13716e5a8bd212e.tar.gz
vim-write-mkpath-5343f325d4214a2272ccf35af13716e5a8bd212e.zip
Merge branch 'hotfix/v2.0.1' into develop
* hotfix/v2.0.1: Add Vim v7.3 dependency Use :file to recognise created path at end of hook
Diffstat (limited to 'autoload/write_mkpath.vim')
-rw-r--r--autoload/write_mkpath.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/write_mkpath.vim b/autoload/write_mkpath.vim
index 8a3ac9d..cba56e9 100644
--- a/autoload/write_mkpath.vim
+++ b/autoload/write_mkpath.vim
@@ -26,4 +26,8 @@ function! write_mkpath#(path) abort
call mkdir(dir, 'p')
endif
+ " 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 %
+
endfunction