From 98ff82ece53bc3ab600e1120b933e44b212e17f7 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sat, 23 Feb 2013 09:55:13 -0800 Subject: [PATCH] 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 --- python/completers/all/omni_completer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/completers/all/omni_completer.py b/python/completers/all/omni_completer.py index 551e4db4..63bc71bf 100644 --- a/python/completers/all/omni_completer.py +++ b/python/completers/all/omni_completer.py @@ -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 ):