mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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.
This commit is contained in:
parent
19e0a9e511
commit
70063937ec
2 changed files with 10 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue