diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-01 11:46:48 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-01 11:46:48 +1200 |
commit | e42e25acb2ffb786cea49f09eeba785f9dec617b (patch) | |
tree | e247cb64e956f49f16fedf55eabf6d360847c8b6 /autoload | |
parent | Merge branch 'release/v1.1.0' into develop (diff) | |
parent | Bump VERSION (diff) | |
download | vim-write-mkpath-e42e25acb2ffb786cea49f09eeba785f9dec617b.tar.gz vim-write-mkpath-e42e25acb2ffb786cea49f09eeba785f9dec617b.zip |
Merge branch 'hotfix/v1.1.1' into develop
* hotfix/v1.1.1:
Just use :keepalt to avoid read-only @#
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/write_mkpath.vim | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/autoload/write_mkpath.vim b/autoload/write_mkpath.vim index 6b1855d..3bcd786 100644 --- a/autoload/write_mkpath.vim +++ b/autoload/write_mkpath.vim @@ -20,14 +20,7 @@ function! write_mkpath#New(path) abort " Set filename to absolute path using :file {name}; do it silently so that " the nice name remains displayed to the user. Record the name of the " alternate buffer first, so we can put it back after :file messes with it. - let alt = @# - execute 'silent file '.fnameescape(getcwd().'/'.a:path) - - " That :file command will have set the alternate buffer to an unlisted - " buffer of the same name, which we don't want. Wipe it, and restore the - " previous alternative buffer. - bwipe # - let @# = alt + execute 'silent keepalt file '.fnameescape(getcwd().'/'.a:path) endfunction |