Fix relative paths for VimwikiRenameLink. Merge PR #787.
Fixes #90 __Problem__: VimwikiRenameLink does not rename dir1/toto url in dir2/tata because the dirs (dir2 and .) were well crossed but badly inspected. __Solution__: `blob(.ext*)` -> `glob(**/*.ext)` + find the relative URL * Fasten: VimwikiRenameLink goes faster with cache More: To compute old_url regex, use a cache dict because it is the same for files in the same directories * Util DeleteHiddenBuffer -> do not delete Vader buffer * Test: Prettify: Util: teardown delete defined function * Remove unnecessary trailing spaces Note: list_VimwikiReturn.vader has some necessary trailing spaces
This commit is contained in:
@@ -97,6 +97,10 @@ endfunction
|
||||
|
||||
" Returns: the relative path from a:dir to a:file
|
||||
function! vimwiki#path#relpath(dir, file) abort
|
||||
" Check if dir here ('.') -> return file
|
||||
if empty(a:dir) || a:dir =~# '^\.[/\\]\?$'
|
||||
return a:file
|
||||
endif
|
||||
let result = []
|
||||
if vimwiki#u#is_windows()
|
||||
" TODO temporary fix see #478
|
||||
|
Reference in New Issue
Block a user