@@ -121,7 +121,7 @@ pub fn handle_update(tile: &mut Tile, message: Message) -> Task<Message> {
121121 height : 55. + DEFAULT_WINDOW_HEIGHT ,
122122 } ,
123123 ) ;
124- } else if tile. query_lc . split ( " " ) . count ( ) > 1 || tile . query_lc . ends_with ( "?" ) {
124+ } else if tile. query_lc . ends_with ( "?" ) {
125125 tile. results = vec ! [ App {
126126 open_command: AppCommand :: Function ( Function :: GoogleSearch ( tile. query. clone( ) ) ) ,
127127 icons: None ,
@@ -162,6 +162,14 @@ pub fn handle_update(tile: &mut Tile, message: Message) -> Task<Message> {
162162 name : "Open Website: " . to_string ( ) + & tile. query ,
163163 name_lc : "" . to_string ( ) ,
164164 } ) ;
165+ } else if tile. query_lc . split ( ' ' ) . count ( ) > 1 {
166+ tile. results . push ( App {
167+ open_command : AppCommand :: Function ( Function :: GoogleSearch ( tile. query . clone ( ) ) ) ,
168+ icons : None ,
169+ desc : "Web Search" . to_string ( ) ,
170+ name : format ! ( "Search for: {}" , tile. query) ,
171+ name_lc : String :: new ( ) ,
172+ } ) ;
165173 } else if tile. results . is_empty ( ) && tile. query_lc == "lemon" {
166174 #[ cfg( target_os = "macos" ) ]
167175 tile. results . push ( App {
@@ -251,7 +259,15 @@ pub fn handle_update(tile: &mut Tile, message: Message) -> Task<Message> {
251259 open_command : AppCommand :: Function ( func) ,
252260 ..
253261 } ) => Task :: done ( Message :: RunFunction ( func. to_owned ( ) ) ) ,
254- Some ( _) | None => Task :: none ( ) ,
262+ Some ( App {
263+ open_command : AppCommand :: Message ( msg) ,
264+ ..
265+ } ) => Task :: done ( msg. to_owned ( ) ) ,
266+ Some ( App {
267+ open_command : AppCommand :: Display ,
268+ ..
269+ } ) => Task :: done ( Message :: ReturnFocus ) ,
270+ None => Task :: none ( ) ,
255271 } ,
256272
257273 Message :: ReloadConfig => {
0 commit comments