Fix #1251 - Handle an empty list in the line callback when NeoVim crashes

This commit is contained in:
w0rp
2017-12-26 18:15:51 +00:00
parent 48cae6afc4
commit c165c7c5d1
2 changed files with 7 additions and 1 deletions

View File

@@ -17,6 +17,12 @@ After:
delfunction LineCallback
delfunction RawCallback
Execute (ALE should handle empty Lists for the lines):
let g:last_line = ale#job#JoinNeovimOutput(1, '', [], 'nl', function('LineCallback'))
AssertEqual [], g:lines
AssertEqual '', g:last_line
Execute (ALE should pass on full lines for NeoVim):
let g:last_line = ale#job#JoinNeovimOutput(1, '', ['x', 'y', ''], 'nl', function('LineCallback'))