What @codebrainz suggested, simply always match whole word. I.e. if a substring is selected, only mark whole words that match the substring.
I disagree that yet another action is needed, since there is still the find dialog, that offers the current functionality as well. I don't want Geany's menu become a complete mess just because of actions that are barely different from each other when there is already method that offers both functionalities (and more). Menu items should cover the most-used actions.