Skip to content

gh-60402: Fix Tab in a string in IDLE - #157593

Merged
terryjreedy merged 1 commit into
python:mainfrom
serhiy-storchaka:gh-60402-tab-in-string
Sep 16, 2026
Merged

terryjreedy merged 1 commit into
python:mainfrom
serhiy-storchaka:gh-60402-tab-in-string

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 15, 2026

Copy link
Copy Markdown
Member

Tab after text in a string, as in a docstring, opened the file name completion list with unrelated names. Open it only if some file name starts with the text before the cursor; otherwise insert a tab. Control-Space still opens the list.

🤖 Generated with Claude Code

Open the file name completion list only if some file name starts
with the text before the cursor; otherwise insert a tab.

Co-authored-by: Roger Serwy <roger.serwy@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@terryjreedy terryjreedy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual testing with tab in string: no match, no box. If one wants a box, force it.
Box is such a nuisance I am willing to call this a bug fix with no discussion needed.

An unwanted match is still a nuisance, whether one gets completion or box.
One must type a fake no-match entry, tab, and correct the entry, or enter '\t',
or do entry in an empty directory. Fortunately, this should be rare in IDLE use.

Alternative is to disable filename completion with tab, which would need discussion, and which would likely be rejected as more needed than literal tab insertion in situations where IDLE is used.

@terryjreedy
terryjreedy merged commit 699e802 into python:main Sep 16, 2026
55 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Sep 16, 2026

Copy link
Copy Markdown

GH-157630 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Sep 16, 2026
@bedevere-app

bedevere-app Bot commented Sep 16, 2026

Copy link
Copy Markdown

GH-157631 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Sep 16, 2026
@bedevere-app

bedevere-app Bot commented Sep 16, 2026

Copy link
Copy Markdown

GH-157632 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants