summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-10-25 23:43:09 +0100
committerw0rp <devw0rp@gmail.com>2017-10-25 23:43:09 +0100
commitda365134b537b00966ba6de1b6184e9fd76e4733 (patch)
tree5c025345cd684c5c057965c2302720b103b8a8c9 /autoload
parent7eb16836d09f3f847165b1e48fc020ecff2e715e (diff)
downloadale-da365134b537b00966ba6de1b6184e9fd76e4733.zip
Fix an exception with notes with no previous message
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/handlers/gcc.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/autoload/ale/handlers/gcc.vim b/autoload/ale/handlers/gcc.vim
index a3f2a302..b7db09eb 100644
--- a/autoload/ale/handlers/gcc.vim
+++ b/autoload/ale/handlers/gcc.vim
@@ -82,8 +82,12 @@ function! ale#handlers#gcc#HandleGCCFormat(buffer, lines) abort
" If the 'error type' is a note, make it detail related to
" the previous error parsed in output
if l:match[4] is# 'note'
- let l:output[-1]['detail'] = get(l:output[-1], 'detail', '')
- \ . s:RemoveUnicodeQuotes(l:match[0]) . "\n"
+ if !empty(l:output)
+ let l:output[-1]['detail'] =
+ \ get(l:output[-1], 'detail', '')
+ \ . s:RemoveUnicodeQuotes(l:match[0]) . "\n"
+ endif
+
continue
endif