From a2d8bd4f90fbca5d645c1f7f09694b1b83cc1460 Mon Sep 17 00:00:00 2001 From: Kaustubh J Date: Fri, 11 Jun 2021 19:41:06 +0530 Subject: [PATCH 1/2] fixing autocomplete on MacOS --- Lib/idlelib/autocomplete_w.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/idlelib/autocomplete_w.py b/Lib/idlelib/autocomplete_w.py index 2e3f9c14a19814..20ab2df51c86c5 100644 --- a/Lib/idlelib/autocomplete_w.py +++ b/Lib/idlelib/autocomplete_w.py @@ -206,6 +206,7 @@ def show_window(self, comp_lists, index, complete, mode, userWantsWin): scrollbar.config(command=listbox.yview) scrollbar.pack(side=RIGHT, fill=Y) listbox.pack(side=LEFT, fill=BOTH, expand=True) + acw.update_idletasks() acw.lift() # work around bug in Tk 8.5.18+ (issue #24570) # Initialize the listbox selection From 769fd9287c6f65cd08259e756522211ed7973996 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Fri, 11 Jun 2021 17:46:47 -0400 Subject: [PATCH 2/2] News and comment. --- Lib/idlelib/autocomplete_w.py | 2 +- Misc/NEWS.d/next/IDLE/2021-06-11-17-43-39.bpo-40128.7vDN3U.rst | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/IDLE/2021-06-11-17-43-39.bpo-40128.7vDN3U.rst diff --git a/Lib/idlelib/autocomplete_w.py b/Lib/idlelib/autocomplete_w.py index 20ab2df51c86c5..13ff60ae4493e6 100644 --- a/Lib/idlelib/autocomplete_w.py +++ b/Lib/idlelib/autocomplete_w.py @@ -206,7 +206,7 @@ def show_window(self, comp_lists, index, complete, mode, userWantsWin): scrollbar.config(command=listbox.yview) scrollbar.pack(side=RIGHT, fill=Y) listbox.pack(side=LEFT, fill=BOTH, expand=True) - acw.update_idletasks() + acw.update_idletasks() # Need for tk8.6.8 on macOS: #40128. acw.lift() # work around bug in Tk 8.5.18+ (issue #24570) # Initialize the listbox selection diff --git a/Misc/NEWS.d/next/IDLE/2021-06-11-17-43-39.bpo-40128.7vDN3U.rst b/Misc/NEWS.d/next/IDLE/2021-06-11-17-43-39.bpo-40128.7vDN3U.rst new file mode 100644 index 00000000000000..dafbe2cd5c3a8f --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2021-06-11-17-43-39.bpo-40128.7vDN3U.rst @@ -0,0 +1,3 @@ +Mostly fix completions on macOS when not using tcl/tk 8.6.11 (as with 3.9). +The added update_idletask call should be harmless and possibly helpful +otherwise.