MCPcopy Index your code
hub / github.com/python/cpython / find_selection

Function find_selection

Lib/idlelib/search.py:49–59  ·  view source on GitHub ↗

Search for the selected pattern in the text. Module-level function to access the singleton SearchDialog instance to search using the selected text. With a text selection, perform the search without displaying the dialog. Without a selection, use the prior entry as the search phrase

(text)

Source from the content-addressed store, hash-verified

47 return _setup(text).find_again(text)
48
49def find_selection(text):
50 """Search for the selected pattern in the text.
51
52 Module-level function to access the singleton SearchDialog
53 instance to search using the selected text. With a text
54 selection, perform the search without displaying the dialog.
55 Without a selection, use the prior entry as the search phrase
56 and don't display the dialog. If there has been no prior
57 search, open the search dialog.
58 """
59 return _setup(text).find_selection(text)
60
61
62class SearchDialog(SearchDialogBase):

Callers

nothing calls this directly

Calls 2

find_selectionMethod · 0.80
_setupFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…