From f7075ed4e5e9207a0815a607c42a7e202c902abd Mon Sep 17 00:00:00 2001 From: Filipe Fortes Date: Wed, 31 Aug 2016 09:57:23 -0700 Subject: [PATCH] Return empty matches if autocomplete not found --- autoload/flowcomplete.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/flowcomplete.vim b/autoload/flowcomplete.vim index eb3a453..21c7d6e 100644 --- a/autoload/flowcomplete.vim +++ b/autoload/flowcomplete.vim @@ -37,6 +37,11 @@ function! flowcomplete#Complete(findstart, base) let command = g:flow#flowpath.' autocomplete '.expand('%:p') let result = system(command, buffer) + if result =~ '^Error: not enough type information to autocomplete' || + \ result =~ '^Could not find file or directory' + return [] + endif + let matches = [] " Parse the flow output.