summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2011-01-29 18:29:01 (GMT)
committerNed Deily <nad@acm.org>2011-01-29 18:29:01 (GMT)
commit70063937ec871a8c4884a359a94be1bbb737daf4 (patch)
tree447f1d61f17d3123bb64440e6c8ae12ca755901b /Lib
parent19e0a9e5111fc4ef16d6b51a61f099a18c0b3b20 (diff)
downloadcpython-70063937ec871a8c4884a359a94be1bbb737daf4.zip
cpython-70063937ec871a8c4884a359a94be1bbb737daf4.tar.gz
cpython-70063937ec871a8c4884a359a94be1bbb737daf4.tar.bz2
Issue #10940: Workaround an IDLE hang on Mac OS X 10.6 when using the
menu accelerators for Open Module, Go to Line, and New Indent Width. The accelerators still work but no longer appear in the menu items.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/EditorWindow.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 938a656..6a1e325 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -1546,7 +1546,12 @@ keynames = {
def get_accelerator(keydefs, eventname):
keylist = keydefs.get(eventname)
- if not keylist:
+ # issue10940: temporary workaround to prevent hang with OS X Cocoa Tk 8.5
+ # if not keylist:
+ if (not keylist) or (macosxSupport.runningAsOSXApp() and eventname in {
+ "<<open-module>>",
+ "<<goto-line>>",
+ "<<change-indentwidth>>"}):
return ""
s = keylist[0]
s = re.sub(r"-[a-z]\b", lambda m: m.group().upper(), s)