mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-04-08 19:35:31 +02:00
fix line number of nvimlsp being off by one (#2713)
The line number vim.diagnostic.get() returns is 0-indexed, but displayed line numbers are 1-indexed
This commit is contained in:
parent
9884c07966
commit
7c7391a1fc
@ -47,7 +47,7 @@ endfunction
|
||||
|
||||
function! s:airline_nvimlsp_get_line_number(cnt, type) abort
|
||||
let severity = a:type == 'Warning' ? 'Warn' : a:type
|
||||
let num = v:lua.vim.diagnostic.get(0, { 'severity': severity })[0].lnum
|
||||
let num = v:lua.vim.diagnostic.get(0, { 'severity': severity })[0].lnum + 1
|
||||
|
||||
let l:open_lnum_symbol =
|
||||
\ get(g:, 'airline#extensions#nvimlsp#open_lnum_symbol', '(L')
|
||||
|
Loading…
x
Reference in New Issue
Block a user