aboutsummaryrefslogtreecommitdiff
path: root/autoload/write_mkpath.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-31 22:02:27 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-31 22:02:27 +1200
commite79d39c2175d0270cfdf3e8e55d134dad732dc8f (patch)
treed6c7fdbaa933f9c4464fd99c9ed06ec158e0c306 /autoload/write_mkpath.vim
parentMerge branch 'release/v0.4.0' into develop (diff)
downloadvim-write-mkpath-e79d39c2175d0270cfdf3e8e55d134dad732dc8f.tar.gz
vim-write-mkpath-e79d39c2175d0270cfdf3e8e55d134dad732dc8f.zip
Remove unneeded variable scoping
Diffstat (limited to 'autoload/write_mkpath.vim')
-rw-r--r--autoload/write_mkpath.vim10
1 files changed, 5 insertions, 5 deletions
diff --git a/autoload/write_mkpath.vim b/autoload/write_mkpath.vim
index 94fe21a..0d3e357 100644
--- a/autoload/write_mkpath.vim
+++ b/autoload/write_mkpath.vim
@@ -9,16 +9,16 @@ function! write_mkpath#(path) abort
" 'confirm' is enabled, and the user responds affirmatively to the prompt,
" that will do, too. Otherwise, we will allow the write to fail.
if v:cmdbang
- let l:mkpath = 1
+ let mkpath = 1
elseif &confirm
- let l:mkpath = confirm('Create path '.a:path.'?', "&Yes\n&No") == 1
+ let mkpath = confirm('Create path '.dir.'?', "&Yes\n&No") == 1
else
- let l:mkpath = 0
+ let mkpath = 0
endif
" If we decided to attempt a path creation, do so
- if l:mkpath
- call mkdir(a:path, 'p')
+ if mkpath
+ call mkdir(dir, 'p')
endif
endfunction