Fix #2326 - ALEComplete no longer replaces completeopt

This commit is contained in:
w0rp
2019-03-08 21:32:05 +00:00
parent be2c0c3af5
commit 413529f603
6 changed files with 79 additions and 72 deletions
@@ -67,7 +67,7 @@ After:
unlet! g:conn_id
unlet! g:Callback
unlet! b:ale_old_omnifunc
unlet! b:ale_old_completopt
unlet! b:ale_old_completeopt
unlet! b:ale_completion_info
unlet! b:ale_completion_response
unlet! b:ale_completion_parser
@@ -102,7 +102,7 @@ Execute(The right message should be sent for the initial tsserver request):
" The cursor position needs to match what was saved before.
call setpos('.', [bufnr(''), 1, 3, 0])
call ale#completion#GetCompletions()
call ale#completion#GetCompletions(0)
" We shouldn't register the callback yet.
AssertEqual '''''', string(g:Callback)
@@ -129,6 +129,7 @@ Execute(The right message should be sent for the initial tsserver request):
\ 'request_id': 1,
\ 'line': 1,
\ 'prefix': 'fo',
\ 'manual': 0,
\ },
\ get(b:, 'ale_completion_info', {})
@@ -190,7 +191,7 @@ Execute(The right message should be sent for the initial LSP request):
" The cursor position needs to match what was saved before.
call setpos('.', [bufnr(''), 1, 5, 0])
call ale#completion#GetCompletions()
call ale#completion#GetCompletions(0)
" We shouldn't register the callback yet.
AssertEqual '''''', string(g:Callback)
@@ -233,6 +234,7 @@ Execute(The right message should be sent for the initial LSP request):
\ 'request_id': 1,
\ 'line': 1,
\ 'prefix': 'fo',
\ 'manual': 0,
\ 'completion_filter': 'ale#completion#python#CompletionItemFilter',
\ },
\ get(b:, 'ale_completion_info', {})
@@ -258,7 +260,7 @@ Execute(Two completion requests shouldn't be sent in a row):
" The cursor position needs to match what was saved before.
call setpos('.', [bufnr(''), 1, 5, 0])
call ale#completion#GetCompletions()
call ale#completion#GetCompletions(0)
" We shouldn't register the callback yet.
AssertEqual '''''', string(g:Callback)