python (3.11.7)
    e                         d Z ddlmZ ddlmZ ddlmZ d Zd Zd Z	d Z
 G d	 d
e          Zd Ze
dk    r'dd
lmZ  eddd           ddlmZ  ee           dS dS )zSearch dialog for Find, Find Again, and Find Selection
   functionality.
   Inherits from SearchDialogBase for GUI and uses searchengine
   to prepare search pattern.
    )TclError)searchengine)SearchDialogBasec                     |                                  }t          j        |          }t          |d          st	          ||          |_        |j        S )zReturn 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.
    
_searchdialog)_rootr   gethasattrSearchDialogr   )textrootengines      B/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/idlelib/search.py_setupr      sN     ::<<D
d
#
#F6?++ :+D&99    c                 t    |                      dd          }t          |                               | |          S )a
  Open the search dialog.
    Module-level function to access the singleton SearchDialog
    instance and open the dialog.  If text is selected, it is
    used as the search phrase; otherwise, the previous entry
    is used.  No search is done with this command.
    	sel.firstsel.last)r	   r   open)r   pats     r   findr      s3     ((;
+
+C$<<T3'''r   c                 F    t          |                               |           S )aS  Repeat the search for the last pattern and preferences.
    Module-level function to access the singleton SearchDialog
    instance to search again using the user entries and preferences
    from the last dialog.  If there was no prior search, open the
    search dialog; otherwise, perform the search without showing the
    dialog.
    )r   
find_againr   s    r   r   r   &