Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef58adf

Browse files
committed
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
1 parent 260cb90 commit ef58adf

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

Lib/idlelib/EditorWindow.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,6 @@ def createmenubar(self):
259259

260260
def postwindowsmenu(self):
261261
# Only called when Windows menu exists
262-
# XXX Actually, this Just-In-Time updating interferes badly
263-
# XXX with the tear-off feature. It would be better to update
264-
# XXX all Windows menus whenever the list of windows changes.
265262
menu = self.menudict['windows']
266263
end = menu.index("end")
267264
if end is None:

Lib/idlelib/GrepDialog.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def grep(text, io=None, flist=None):
1111
if not hasattr(engine, "_grepdialog"):
1212
engine._grepdialog = GrepDialog(root, engine, flist)
1313
dialog = engine._grepdialog
14-
dialog.open(io)
14+
searchphrase = text.get("sel.first", "sel.last")
15+
dialog.open(text, searchphrase, io)
1516

1617
class GrepDialog(SearchDialogBase):
1718

@@ -25,8 +26,8 @@ def __init__(self, root, engine, flist):
2526
self.globvar = StringVar(root)
2627
self.recvar = BooleanVar(root)
2728

28-
def open(self, io=None):
29-
SearchDialogBase.open(self, None)
29+
def open(self, text, searchphrase, io=None):
30+
SearchDialogBase.open(self, text, searchphrase)
3031
if io:
3132
path = io.filename or ""
3233
else:

0 commit comments

Comments
 (0)