Removing falsy items from omnifunc returned items

Depending on the omnifunc the user has set, it could return empty strings etc in
the list of items.

Fixes #146, fixes #147
This commit is contained in:
Strahinja Val Markovic 2013-02-23 09:55:13 -08:00
parent c1700c7d19
commit 98ff82ece5

View File

@ -54,7 +54,9 @@ class OmniCompleter( Completer ):
"')" ]
items = vim.eval( ''.join( omnifunc_call ) )
self.stored_candidates = items.words if hasattr( items, 'words' ) else items
if hasattr( items, 'words' ):
items = item.words
self.stored_candidates = filter( bool, items )
def AsyncCandidateRequestReadyInner( self ):