Correct line number for coc.nvim warnings.

- The line number index is 0 for errors, 1 for warnings.
This commit is contained in:
Adrian Trunzo 2021-06-03 14:23:44 -06:00
parent a8b3c254d0
commit fdda58861b

View File

@ -38,7 +38,7 @@ function! airline#extensions#coc#get(type) abort
if empty(cnt)
return ''
else
let lnum = printf('(L%d)', (info.lnums)[0])
let lnum = printf('(L%d)', (info.lnums)[is_err ? 0 : 1])
return (is_err ? s:error_symbol : s:warning_symbol).cnt.lnum
endif
endfunction