mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Fix for #731643: allow "lookup in documentation" to also work if the
interactive window is frontmost.
This commit is contained in:
parent
c7c78ae531
commit
9a79182316
4 changed files with 16 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue