summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoracio Sanson <hsanson@gmail.com>2022-02-09 23:25:52 +0900
committerGitHub <noreply@github.com>2022-02-09 23:25:52 +0900
commit47470eddc277e0a141e6e36a1e2a19045e051d1c (patch)
tree6fc6981dc7ded6f45bd9cf67e832a878f17df1f1
parent82a3e444b299cff3127809b02ea63c819486f285 (diff)
downloadale-47470eddc277e0a141e6e36a1e2a19045e051d1c.zip
Sometimes end_lnum and end_col are not present (#4062)
-rw-r--r--autoload/ale/codefix.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/ale/codefix.vim b/autoload/ale/codefix.vim
index 853ee4e8..938d9637 100644
--- a/autoload/ale/codefix.vim
+++ b/autoload/ale/codefix.vim
@@ -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)
\ },
\ },
\ },