◐ Shell
clean mode source ↗

Message 270898 - Python tracker

It is intentional that <modifier> <tab> be treated as a normal tab.  The autocomplete_event tab handler begins with
    if hasattr(event, "mc_state") and event.mc_state:
        # A modifier was pressed along with the tab, continue as usual.
        return

To fix the problem with tabs at the beginning of a line within multiline strings, I am adding to the condition a clause to catch tabs at the beginning of lines, whether within a multiline string or not.

    or not self.text.get("insert linestart", "insert").strip()

Tests still pass with this addition.  I need to add a test that fails without it.

I think a tab should bring up completion box even immediately after an opening quote, as in
    open('<tab>
Typing a letter fails to open a box if there is only one completion, so that is not a foolproof way to get a box with all choices.