Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Commit 2d6a904

Browse files
authored
Merge pull request #35 from fortes/no-autocomplete-matches
Return empty matches if autocomplete not found
2 parents 5a48525 + f7075ed commit 2d6a904

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

autoload/flowcomplete.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ function! flowcomplete#Complete(findstart, base)
3737
let command = g:flow#flowpath.' autocomplete '.expand('%:p')
3838
let result = system(command, buffer)
3939

40+
if result =~ '^Error: not enough type information to autocomplete' ||
41+
\ result =~ '^Could not find file or directory'
42+
return []
43+
endif
44+
4045
let matches = []
4146

4247
" Parse the flow output.

0 commit comments

Comments
 (0)