You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening a symbolic link on a file, vaffle actually opens the file resolved by the normalize-path function. And I don't think that it is really wise.
I would prefer to edit the link which is local.
To avoid troubles, I had to modify the vaffle#util#normalize_path function:
function! vaffle#util#normalize_path(path) abort
if a:path ==? '/'
return '/'
endif
let result = resolve(a:path)
if !isdirectory(result)
let result = a:path
endif
" Remove trailing path separator
return (match(result, '\(/\|\\\)$') >= 0)
\ ? fnamemodify(result, ':h')
\ : result
endfunction
With this modification, it the result of the resolve function is a directory, the behavior is as in the original version. If it is a regular file, then one keeps the original path.
Best regards
Stephane
The text was updated successfully, but these errors were encountered:
When opening a symbolic link on a file, vaffle actually opens the file resolved by the normalize-path function. And I don't think that it is really wise.
I would prefer to edit the link which is local.
To avoid troubles, I had to modify the vaffle#util#normalize_path function:
function! vaffle#util#normalize_path(path) abort
if a:path ==? '/'
return '/'
endif
endfunction
With this modification, it the result of the resolve function is a directory, the behavior is as in the original version. If it is a regular file, then one keeps the original path.
Best regards
Stephane
The text was updated successfully, but these errors were encountered: