Changed sorting from by match type to by alphabet if the user hit tab only once, or we had no visible completion list.
(closes: #923)