make search widget behaviour more intuitive

when there is a selection it is set as the search text, otherwise
the current word is only set when there is no current search text.
when the text cursor would currently be in a search result, it is
selected and not the next search result.