summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-06-01 14:49:13 +0100
committerw0rp <devw0rp@gmail.com>2018-06-01 14:49:23 +0100
commita8951cc802417398a0cec09e0b518f823275172a (patch)
treefd55d46f78b34a2fa3821c18345badcb5df38f77
parentfd49c2d2070c29738a2a6e7ba86c8128341eb93d (diff)
downloadale-a8951cc802417398a0cec09e0b518f823275172a.zip
Fix LSP message handling when the handler doesn't get strings, somehow
-rw-r--r--autoload/ale/lsp.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/ale/lsp.vim b/autoload/ale/lsp.vim
index 8db9348f..c1d04dbf 100644
--- a/autoload/ale/lsp.vim
+++ b/autoload/ale/lsp.vim
@@ -207,6 +207,11 @@ function! ale#lsp#HandleOtherInitializeResponses(conn, response) abort
endfunction
function! ale#lsp#HandleMessage(conn, message) abort
+ if type(a:message) != type('')
+ " Ignore messages that aren't strings.
+ return
+ endif
+
let a:conn.data .= a:message
" Parse the objects now if we can, and keep the remaining text.