Fix #46 - Fix incorrect error message type when ctags command failed

This commit is contained in:
Junegunn Choi
2015-11-28 01:14:12 +09:00
parent 9a45d70f00
commit 3db992a883

View File

@@ -420,7 +420,7 @@ function! s:btags_source()
for cmd in [
\ printf('ctags -f - --sort=no --excmd=number --language-force=%s %s', &filetype, expand('%:S')),
\ printf('ctags -f - --sort=no --excmd=number %s', expand('%:S'))]
let lines = map(split(system(cmd), "\n"), 'split(v:val, "\t")')
let lines = split(system(cmd), "\n")
if !v:shell_error
break
endif
@@ -430,7 +430,7 @@ function! s:btags_source()
elseif empty(lines)
throw 'No tags found'
endif
return map(s:align_lists(lines), 'join(v:val, "\t")')
return map(s:align_lists(map(lines, 'split(v:val, "\t")')), 'join(v:val, "\t")')
endfunction
function! s:btags_sink(lines)