summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/ale/completion.vim2
-rw-r--r--test/completion/test_completion_events.vader6
2 files changed, 7 insertions, 1 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim
index a15ca514..63e2247c 100644
--- a/autoload/ale/completion.vim
+++ b/autoload/ale/completion.vim
@@ -722,7 +722,7 @@ endfunction
function! ale#completion#HandleUserData(completed_item) abort
let l:source = get(get(b:, 'ale_completion_info', {}), 'source', '')
- if l:source isnot# 'ale-automatic' && l:source isnot# 'ale-manual'
+ if l:source isnot# 'ale-automatic' && l:source isnot# 'ale-manual' && l:source isnot# 'ale-callback'
return
endif
diff --git a/test/completion/test_completion_events.vader b/test/completion/test_completion_events.vader
index e06ac98b..d70fefeb 100644
--- a/test/completion/test_completion_events.vader
+++ b/test/completion/test_completion_events.vader
@@ -431,6 +431,12 @@ Execute(HandleUserData should call ale#code_action#HandleCodeAction):
\})
AssertEqual g:handle_code_action_called, 2
+ let b:ale_completion_info = {'source': 'ale-callback'}
+ call ale#completion#HandleUserData({
+ \ 'user_data': '{"codeActions": [{"description":"", "changes": []}]}'
+ \})
+ AssertEqual g:handle_code_action_called, 3
+
Execute(ale#code_action#HandleCodeAction should not be called when when source is not ALE):
call MockHandleCodeAction()
let b:ale_completion_info = {'source': 'syntastic'}