Fix alias edge case detection in cfile

This commit is contained in:
Juho Teperi 2015-09-26 16:57:35 +03:00 committed by Tim Pope
parent 04a7f542f5
commit df563ed15f

View File

@ -1348,10 +1348,15 @@ function! fireplace#cfile() abort
elseif file =~# '^[^/]*/[^/.]*$' && file =~# '^\k\+$'
let [file, jump] = split(file, "/")
if file !~# '\.'
try
let file = tr(fireplace#evalparse('((ns-aliases *ns*) '.s:qsym(file).' '.s:qsym(file).')'), '.-', '/_')
catch /^Clojure:/
endtry
if fireplace#op_available('info')
let res = fireplace#message({'op': 'info', 'symbol': file})
let file = get(get(res, 0, {}), 'ns', file)
else
try
let file = tr(fireplace#evalparse('((ns-aliases *ns*) '.s:qsym(file).' '.s:qsym(file).')'), '.-', '/_')
catch /^Clojure:/
endtry
endif
endif
elseif file =~# '^\w[[:alnum:]-]\+\.[[:alnum:].-]\+$'
let file = tr(file, '.-', '/_')