If the query is a prefix of what would complete with the suggestion, just use the suggestion

the logic for removing doubles only needs to be applied in the case
where there is EXTRA text before the start of the suggestion

Fixes b/6995886 Selecting search suggestion causes strange behavior

Change-Id: If2a2c3824ab5e7e02aa9fe80d955c31d6e3ad5fa
1 file changed