diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2003-06-07 03:21:17 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2003-06-07 03:21:17 (GMT) |
commit | ef58adf8d6828475a95b36b390d6b788e0894c99 (patch) | |
tree | 21ee2be8c14a0db77ac96f2ef9b3b5984c932af0 /Lib/idlelib/GrepDialog.py | |
parent | 260cb9034c861fa159f26fba8679ac265af47109 (diff) | |
download | cpython-ef58adf8d6828475a95b36b390d6b788e0894c99.zip cpython-ef58adf8d6828475a95b36b390d6b788e0894c99.tar.gz cpython-ef58adf8d6828475a95b36b390d6b788e0894c99.tar.bz2 |
1. Find in Files Dialog shows text selection if there is one
2. Remove obsolete comment associated with Window menu updating
M EditorWindow.py
M GrepDialog.py
Diffstat (limited to 'Lib/idlelib/GrepDialog.py')
-rw-r--r-- | Lib/idlelib/GrepDialog.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/idlelib/GrepDialog.py b/Lib/idlelib/GrepDialog.py index 84cac0e..79fad31 100644 --- a/Lib/idlelib/GrepDialog.py +++ b/Lib/idlelib/GrepDialog.py @@ -11,7 +11,8 @@ def grep(text, io=None, flist=None): if not hasattr(engine, "_grepdialog"): engine._grepdialog = GrepDialog(root, engine, flist) dialog = engine._grepdialog - dialog.open(io) + searchphrase = text.get("sel.first", "sel.last") + dialog.open(text, searchphrase, io) class GrepDialog(SearchDialogBase): @@ -25,8 +26,8 @@ class GrepDialog(SearchDialogBase): self.globvar = StringVar(root) self.recvar = BooleanVar(root) - def open(self, io=None): - SearchDialogBase.open(self, None) + def open(self, text, searchphrase, io=None): + SearchDialogBase.open(self, text, searchphrase) if io: path = io.filename or "" else: |