diff options
Diffstat (limited to 'Mac/Tools/IDE/PythonIDEMain.py')
-rw-r--r-- | Mac/Tools/IDE/PythonIDEMain.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Mac/Tools/IDE/PythonIDEMain.py b/Mac/Tools/IDE/PythonIDEMain.py index 1414995552..5987c10d79 100644 --- a/Mac/Tools/IDE/PythonIDEMain.py +++ b/Mac/Tools/IDE/PythonIDEMain.py @@ -414,10 +414,10 @@ class PythonIDE(Wapplication.Application): W.Message("AppleHelp Error: %s" % `arg`) def _getsearchstring(self): - import PyEdit - editor = PyEdit.findeditor(None, fromtop=1) - if editor: - text = editor.getselectedtext() + # First we get the frontmost window + front = self.getfrontwindow() + if front and hasattr(front, 'getselectedtext'): + text = front.getselectedtext() if text: return text # This is a cop-out. We should have disabled the menus |