Sometimes end_lnum and end_col are not present (#4062)

This commit is contained in:
Horacio Sanson 2022-02-09 23:25:52 +09:00 committed by GitHub
parent 82a3e444b2
commit 47470eddc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -391,8 +391,8 @@ function! s:OnReady(
\ 'character': l:nearest_error.col - 1,
\ },
\ 'end': {
\ 'line': l:nearest_error.end_lnum - 1,
\ 'character': l:nearest_error.end_col,
\ 'line': get(l:nearest_error, 'end_lnum', 1) - 1,
\ 'character': get(l:nearest_error, 'end_col', 0)
\ },
\ },
\ },