Repository navigation
Closed
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13only security fixesonly security fixestopic-IDLEtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
| BPO | 13586 |
|---|---|
| Nosy | @terryjreedy, @serwy, @roseman, @ZackerySpytz |
| PRs | |
| Files |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = 'https://github.com/terryjreedy'
closed_at = None
created_at = <Date 2011-12-12.05:41:52.415>
labels = ['expert-IDLE', 'type-bug', '3.7']
title = 'IDLE: Replace selected not working/consistent with find'
updated_at = <Date 2019-12-13.19:55:46.493>
user = 'https://bugs.python.org/marco'bugs.python.org fields:
activity = <Date 2019-12-13.19:55:46.493>
actor = 'ZackerySpytz'
assignee = 'terry.reedy'
closed = False
closed_date = None
closer = None
components = ['IDLE']
creation = <Date 2011-12-12.05:41:52.415>
creator = 'marco'
dependencies = []
files = ['24003', '24016']
hgrepos = []
issue_num = 13586
keywords = ['patch']
message_count = 9.0
messages = ['149276', '149647', '149663', '149697', '149734', '149735', '149737', '149812', '358353']
nosy_count = 5.0
nosy_names = ['terry.reedy', 'roger.serwy', 'markroseman', 'marco', 'ZackerySpytz']
pr_nums = ['17593']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue13586'
versions = ['Python 3.6', 'Python 3.7']Linked PRs
- [3.12] gh-57795: IDLE: Enter the selected text when opening the "Replace" dialog (GH-17593) #113514
- [3.11] gh-57795: IDLE: Enter the selected text when opening the "Replace" dialog (GH-17593) #113515
- gh-57795: Add news to idlelib/News3.txt #113522
- [3.12] gh-57795: Add news to idlelib/News3.txt (GH-113522) #113523
- [3.11] gh-57795: Add news to idlelib/News3.txt (GH-113522) #113524
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13only security fixesonly security fixestopic-IDLEtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsDone
Activity
marco commentedon Dec 12, 2011
Entering the Replace dialog (by ctrl+h or from Edit/Replace... menu) with a selection does not auto-magically have the selected text in the find field.
This is not consistent with the other find functions (ctrl+f: Find...; alt+F3: Find in Files...; ctrl+F3: Find Selection) where the highlighted text automatically entered in the find field.
terryjreedy commentedon Dec 17, 2011
In 3.2 on Win 7, selected text *is* put in the 'find' field of Replace boxes, just as with Find boxes, just as it should be. So there is something specific either to 2.7 (which is unusual, since the code base in mostly the same, but possible) or to your OS. What are you running Python with?
[-]Replace selected not working/consistent with find[/-][+]IDLE: Replace selected not working/consistent with find[/+]marco commentedon Dec 17, 2011
Win 7 Pro 32bit.
serwy commentedon Dec 17, 2011
On Linux using 2.7.1 and 3.2, the Replace dialog does not contain the selected text in the Find field.
The find functionality that copies the selected text was introduced in 868ff0dfabd2 on 2002-11-06. Unfortunately it wasn't added to the Replace Dialog code. The attached patch (against 3.3a0) adds this functionality to Replace Dialog and also removes some non-functional (arguably broken) code.
marco commentedon Dec 18, 2011
To check on 3.2 I installed a fresh Python 3.2.1.1 on Win7 x86 32bit and it has the same problem.
So this issues is valid on 2.7.2.1 and 3.2.1.1
I --dry-run Roger patch on both 2.7 and 3.2 with no errors or warnings messages and after patching it fixes the issue on both versions.
terryjreedy commentedon Dec 18, 2011
I am running 3.2.2 on 64-bit Win7Pro, which should not make a difference. So why did ^H work right for me yesterday and not for Marco today.
Retrying with fresh IDLEs I discovered the following: selections do not initially appear in the find part of a Replace box (^H). But after selecting and opening a Find box (^F) with something selected, the same text appears in Replace boxes regardless of the actual selection, even if there is no selection -- until another Find box is opened.
So I was fooled yesterday because I tried ^F first to see what the 'correct' behavior was and then did ^H with the same selection. And I did the same in both Shell and Edit windows. When testing, order matters ;-).
I discovered something else I am not sure is what we want. Clicking Find in a Replace box leaves the box open so one can Find again. Clicking Find in a Find box closes it. So you need ^F and Find to re-search.
marco commentedon Dec 18, 2011
To follow on Terry thought, I think find dialog box should stay open when 'Find' button is pressed, since there is a 'close' button to close it.
That would also be a more accepted behavior similar to all the other editors I know.
And on silly UI design notes:
The 'close' button should be at the bottom instead of the top (and have a capital C)
ctrl+f 'Find' button should say 'Find Next' like most other editors and also since that is what it does.
marco commentedon Dec 19, 2011
Thank you Roger
find_keep_open.patch works, but now that brings me to bpo-13630 that I thought was existing, and now this confirms it.
ZackerySpytz commentedon Dec 13, 2019
I've created a pull request for this issue. Please take a look.
10 remaining items
[3.11] gh-57795: IDLE: Enter the selected text when opening the "Repl…
[3.12] gh-57795: IDLE: Enter the selected text when opening the "Repl…
pythongh-57795: Add news to idlelib/News3.txt
gh-57795: Add news to idlelib/News3.txt (#113522)
pythongh-57795: Add news to idlelib/News3.txt (pythonGH-113522)
pythongh-57795: Add news to idlelib/News3.txt (pythonGH-113522)
[3.12] gh-57795: Add news to idlelib/News3.txt (GH-113522) (#113523)
[3.11] gh-57795: Add news to idlelib/News3.txt (GH-113522) (#113524)
pythongh-57795: IDLE: Enter the selected text when opening the "Repla…
pythongh-57795: Add news to idlelib/News3.txt (python#113522)
pythongh-57795: IDLE: Enter the selected text when opening the "Repla…
pythongh-57795: Add news to idlelib/News3.txt (python#113522)
pythongh-57795: IDLE: Enter the selected text when opening the "Repla…
pythongh-57795: Add news to idlelib/News3.txt (python#113522)