From 17db495445ba1f6c9d360ade62471d49ceb05cfe Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 23 Jul 2006 09:41:09 +0000 Subject: [PATCH] Without this patch CMD-W won't close EditorWindows on MacOS X. This solves part of bug #1517990. --- Lib/idlelib/EditorWindow.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 5dca4c1f828..442d7187f52 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -121,6 +121,9 @@ class EditorWindow(object): self.top.protocol("WM_DELETE_WINDOW", self.close) self.top.bind("<>", self.close_event) + if macosxSupport.runningAsOSXApp(): + # Command-W on editorwindows doesn't work without this. + text.bind('<>", self.cut) text.bind("<>", self.copy) text.bind("<>", self.paste)