Return the new or existing singleton SearchDialog instance. The singleton dialog saves user entries and preferences across instances. Args: text: Text widget containing the text to be searched.
(text)
| 10 | from idlelib.searchbase import SearchDialogBase |
| 11 | |
| 12 | def _setup(text): |
| 13 | """Return the new or existing singleton SearchDialog instance. |
| 14 | |
| 15 | The singleton dialog saves user entries and preferences |
| 16 | across instances. |
| 17 | |
| 18 | Args: |
| 19 | text: Text widget containing the text to be searched. |
| 20 | """ |
| 21 | root = text._root() |
| 22 | engine = searchengine.get(root) |
| 23 | if not hasattr(engine, "_searchdialog"): |
| 24 | engine._searchdialog = SearchDialog(root, engine) |
| 25 | return engine._searchdialog |
| 26 | |
| 27 | def find(text): |
| 28 | """Open the search dialog. |
no test coverage detected
searching dependent graphs…