Fix launching empty query
If the query is prefixed with a space the launched entry should not be added to the history, in case there is nothing after the query the trimmed string would be empty.
If the query is prefixed with a space the launched entry should not be added to the history, in case there is nothing after the query the trimmed string would be empty.