How to cancel search highlight in Eclipse

Solution 1:

Remove your matches in the search view, that will remove the highlighting. I.e., click the button with the two X's in the search view.

If you cannot see that view, navigate to window -> show view -> Search

Solution 2:

AFIAK, the search result view has a toolbar button to clear the search results. This removes the highlighting in the editor.

Solution 3:

An alternative way is to run a search that will yield no results. For example file search, containing text - leave this field empty, files - some stupid extension like ".qwe".

For people concerned that https://stackoverflow.com/a/3545215/6012102 removes search results from history.

Select the search from history, press "Run the current search again" (2 rotating arrows icon). This will run the search and you will get all the results back (this brings back the text highlight as well unfortunately).