summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/EditorWindow.py3
-rw-r--r--Lib/idlelib/GrepDialog.py7
2 files changed, 4 insertions, 6 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index da08d71..c63823a 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -259,9 +259,6 @@ class EditorWindow:
def postwindowsmenu(self):
# Only called when Windows menu exists
- # XXX Actually, this Just-In-Time updating interferes badly
- # XXX with the tear-off feature. It would be better to update
- # XXX all Windows menus whenever the list of windows changes.
menu = self.menudict['windows']
end = menu.index("end")
if end is None:
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: