This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE autocomplete window does not automatically close when selection is made
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: IDLE code completion window can hang or misbehave with mouse
View: 15786
Assigned To: Nosy List: Al.Sweigart, terry.reedy
Priority: normal Keywords:

Created on 2015-04-15 01:22 by Al.Sweigart, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg241068 - (view) Author: Al Sweigart (Al.Sweigart) * Date: 2015-04-15 01:22
All autocomplete features (for example, Eclipse & Android Studio) cause the autocomplete window to disappear when a selection is made. When tab is pressed in IDLE, the window does not disappear.

IDLE should be changed so that the window goes away when tab is pressed to complete the window after Ctrl+Space or Edit > Show Completions openedit. Currently, the window stays open until another keyboard key is pressed (e.g. space, or an opening parenthesis)
msg241070 - (view) Author: Al Sweigart (Al.Sweigart) * Date: 2015-04-15 01:34
Edit: Looking into it further, this behavior was originally for when the Show Completions dropdown wasn't being displayed. In that case, pressing tab would complete only up to the first ambiguous completion.

For example, typing "os.ge" and pressing tab would complete to "os.get", since from there it is ambiguous whether it will be os.get_exec_path, os.get_handle_inheritable, get_terminal_size, etc.

This behavior should stay the same. Although if it is completely unambiguous what the final completion is (say for typing "pri" and pressing tab, which can only autocomplete to "print") then the Show Completions dropdown should disappear.
msg241369 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-04-17 21:38
I believe Tab is working as designed.  If so, you are requesting that the design be reviewed and possible changed.  As noted in #15786, Click and Enter are not working as intended, so I think fixing the bugs is a higher priority.
msg241428 - (view) Author: Al Sweigart (Al.Sweigart) * Date: 2015-04-18 17:08
I should clarify: I'm referring to the "Show Completion" feature. The repro steps are (on Windows 7 64-bit, Python 3.5)

1. Type "pri"
2. Press Ctrl+Space or click Edit > Show Completions. The autocomplete window appears.
3. Press Tab. The text updates from "pri" to "print"
4. However, the autocomplete window is still there.
5. Pressing space or ( will then cause the autocomplete window to disappear.

This is distinct from issue 15786, but close enough that I'll close this bug and add this comment to it. Thanks for the input!
History
Date User Action Args
2022-04-11 14:58:15adminsetgithub: 68149
2016-04-25 03:54:14berker.peksagsetstatus: open -> closed
superseder: IDLE code completion window can hang or misbehave with mouse
stage: resolved
2015-04-18 17:08:08Al.Sweigartsetresolution: duplicate
messages: + msg241428
2015-04-17 21:38:41terry.reedysetnosy: + terry.reedy
messages: + msg241369
2015-04-15 01:34:32Al.Sweigartsetmessages: + msg241070
2015-04-15 01:22:15Al.Sweigartcreate