summaryrefslogtreecommitdiffstats
path: root/Mac/Tools/IDE/PythonIDEMain.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-05-06 14:28:31 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-05-06 14:28:31 (GMT)
commit9a79182316f6297018221873d1932889b427ac84 (patch)
treebc03dba82120c0279c1c49b5f95a7af64c784b63 /Mac/Tools/IDE/PythonIDEMain.py
parentc7c78ae531ef6fab5ad354e616ee73c4a52ac422 (diff)
downloadcpython-9a79182316f6297018221873d1932889b427ac84.zip
cpython-9a79182316f6297018221873d1932889b427ac84.tar.gz
cpython-9a79182316f6297018221873d1932889b427ac84.tar.bz2
Fix for #731643: allow "lookup in documentation" to also work if the
interactive window is frontmost.
Diffstat (limited to 'Mac/Tools/IDE/PythonIDEMain.py')
-rw-r--r--Mac/Tools/IDE/PythonIDEMain.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Mac/Tools/IDE/PythonIDEMain.py b/Mac/Tools/IDE/PythonIDEMain.py
index 1414995..5987c10 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