aboutsummaryrefslogtreecommitdiff
path: root/autoload/sonictemplate.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/sonictemplate.vim')
-rw-r--r--autoload/sonictemplate.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim
index f411ada..14838cb 100644
--- a/autoload/sonictemplate.vim
+++ b/autoload/sonictemplate.vim
@@ -170,7 +170,7 @@ function! sonictemplate#getvar(name) abort
endfunction
function! s:dir() abort
- let l:name = expand('%:t:r:')
+ let l:name = expand('%:p:h:t:r')
if empty(l:name)
let l:name = fnamemodify(getcwd(), ':t')
endif
@@ -178,7 +178,7 @@ function! s:dir() abort
endfunction
function! s:name(default) abort
- let l:name = expand('%:t:r:')
+ let l:name = expand('%:t:r')
if empty(l:name)
let l:name = a:default
endif