#1700 - Stop handling completion results if you leave insert mode

This commit is contained in:
w0rp
2018-07-16 17:57:07 +01:00
parent aa54c10bae
commit 37df1f8ceb
3 changed files with 59 additions and 2 deletions

View File

@@ -30,6 +30,11 @@ Before:
\}
endfunction
" Pretend we're in insert mode for most tests.
function! ale#util#Mode(...) abort
return 'i'
endfunction
" Replace the Send function for LSP, so we can monitor calls to it.
function! ale#lsp#Send(conn_id, message, ...) abort
call add(g:message_list, a:message)
@@ -49,6 +54,11 @@ After:
unlet! b:ale_linters
unlet! b:ale_tsserver_completion_names
" Reset the function.
function! ale#util#Mode(...) abort
return call('mode', a:000)
endfunction
call ale#lsp#RemoveConnectionWithID(347)
call ale#test#RestoreDirectory()
call ale#linter#Reset()