diff --git a/autoload/neosnippet/util.vim b/autoload/neosnippet/util.vim index 7d3a9aa..b494ec0 100644 --- a/autoload/neosnippet/util.vim +++ b/autoload/neosnippet/util.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: util.vim " AUTHOR: Shougo Matsushita -" Last Modified: 30 Sep 2012. +" Last Modified: 23 Oct 2012. " License: MIT license {{{ " Permission is hereby granted, free of charge, to any person obtaining " a copy of this software and associated documentation files (the @@ -55,11 +55,12 @@ function! neosnippet#util#iconv(...)"{{{ endfunction"}}} function! neosnippet#util#expand(path)"{{{ - return s:V.substitute_path_separator( - \ (a:path =~ '^\~') ? substitute(a:path, '^\~', expand('~'), '') : + let path = (a:path =~ '^\~') ? + \ substitute(a:path, '^\~', expand('~'), '') : \ (a:path =~ '^\$\h\w*') ? substitute(a:path, \ '^\$\h\w*', '\=eval(submatch(0))', '') : - \ a:path) + \ a:path + return s:V.substitute_path_separator(fnamemodify(path, ':p')) endfunction"}}} function! neosnippet#util#set_default(var, val, ...) "{{{ if !exists(a:var) || type({a:var}) != type(a:val) diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 04ae305..a5d3218 100644 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -454,6 +454,9 @@ snippet *neosnippet-unite-action-snippet* ============================================================================== CHANGELOG *neosnippet-changelog* +2012-10-23 +- Improved neosnippet#util#expand(). + 2012-10-21 - Added options head. - Added options word.