glimpse/plugin/glimpse.vim
branchvim-stuff
changeset 4 4ffc0380b228
parent 1 fd505fd00e63
child 10 a8f9271a7cab
--- a/glimpse/plugin/glimpse.vim	Sun Mar 22 00:49:45 2009 +0000
+++ b/glimpse/plugin/glimpse.vim	Sat Mar 28 02:57:39 2009 +0000
@@ -88,7 +88,12 @@
 
 	" execute the search.
 	"
-	let l:cmd = "glimpse " . g:glimpseFlags . " -F '" . l:cwd . ";" . l:file_pattern . "' '" . l:search_pattern . "'"
+	let l:cmd = "glimpse " . g:glimpseFlags . " -F '" . l:cwd
+	if ( l:file_pattern != '' )
+		let l:cmd = l:cmd . ";" . l:file_pattern
+	endif
+	let l:cmd = l:cmd . "' '" . l:search_pattern . "'"
+
 	let l:result_list = split( system( l:cmd ), "\n" )
 
 	" no results, escape now