aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-31 22:47:24 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-31 23:03:10 +1200
commit837c3d975f232c5fddd00dac3def26efc4ab8609 (patch)
treefac124b435cad681204bca11fb25d83e51afd2b1
parentHandle :cd then buffer write of non-existent path (diff)
downloadvim-write-mkpath-837c3d975f232c5fddd00dac3def26efc4ab8609.tar.gz
vim-write-mkpath-837c3d975f232c5fddd00dac3def26efc4ab8609.zip
Suppress potentially confusing :file output
-rw-r--r--autoload/write_mkpath.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/autoload/write_mkpath.vim b/autoload/write_mkpath.vim
index aca49f1..bfe45bd 100644
--- a/autoload/write_mkpath.vim
+++ b/autoload/write_mkpath.vim
@@ -17,8 +17,9 @@ function! write_mkpath#New(path) abort
return
endif
- " Set filename to absolute path using :file {name}
- execute 'file '.fnameescape(getcwd().'/'.a:path)
+ " Set filename to absolute path using :file {name}; do it silently so that
+ " the nice name remains displayed to the user
+ execute 'silent file '.fnameescape(getcwd().'/'.a:path)
endfunction