New submission from Terry J. Reedy <tjre...@udel.edu>:

(Original report by Mikhail on #43647, running 3.9 on Linux; verified and 
extended by me running 3.10 on Windows.)

Normally, "i<tab>" brings up a completion window with 'id', 'if', 'import', 
etc.  Opening a Settings windows with Options => Configure IDLE and closing 
with Apply and Cancel or OK (which also applies) disables tab completion.  
Other completions (forced with ^<space> or auto with '.' or '/' and waits seem 
not affected.  The only way to restore is to close and reopen each window.

Tab completions are enabled in editor.py with these two lines.
        text.event_add('<<autocomplete>>', '<Key-Tab>')
        text.bind("<<autocomplete>>", autocomplete.autocomplete_event) 
Attribute and path completions, not affected, are enabled with these.
        text.event_add('<<try-open-completions>>', '<KeyRelease-period>',
                       '<KeyRelease-slash>', '<KeyRelease-backslash>
        text.bind("<<try-open-completions>>",
                  autocomplete.try_open_completions_event)
Similarly for some other things.

In configdialog, the relevant method is (179) def apply, who relevant calls are 
(219) deactivate_current_config and (230) activate_current_config.  The former 
removes key bindings and the latter rebinds and makes other changes.

What is different about Tab versus '.' is that is tab also used for indents and 
the indent space is reset by 'activate...'.  I will later add some debug prints 
to console based on the clues above.

----------
assignee: terry.reedy
components: IDLE
messages: 389673
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: Applying settings disables tab completion
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43654>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to