gh-60402: Fix Tab in a string in IDLE - #157593
Conversation
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>
08c90ef to
b6d1989
Compare
terryjreedy
left a comment
There was a problem hiding this comment.
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.
|
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. |
|
GH-157630 is a backport of this pull request to the 3.15 branch. |
|
GH-157631 is a backport of this pull request to the 3.14 branch. |
|
GH-157632 is a backport of this pull request to the 3.13 branch. |
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