This change adds a new option for searching the selected text inside the document. The following image explains the proposed solution:
In this short video, we can see the proposed solution:
Works great. I have some UI suggestions below:
This grammar change makes it wrong for all the other entries.
Maybe the new "Search for <text> in open document" menu item should be in the base level of the context menu, and not inside the sub-menu.
The icon should be document-preview (document-open is used for actions that open documents)
I was thinking about that because even if you don't have any external provider, you should have the option to search within the document. I didn't want to change to much the existing code, my fault.
I will update taking into consideration your suggestion.