-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDLE: Replace selected not working/consistent with find #57795
Comments
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. |
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? |
Win 7 Pro 32bit. |
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. |
To check on 3.2 I installed a fresh Python 3.2.1.1 on Win7 x86 32bit and it has the same problem. |
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. |
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. And on silly UI design notes: |
Thank you Roger |
I've created a pull request for this issue. Please take a look. |
…alog (GH-17593) Co-authored-by: Roger Serwy <roger.serwy@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…ce" dialog (pythonGH-17593) (cherry picked from commit 712afab) Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Roger Serwy <roger.serwy@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…ce" dialog (pythonGH-17593) (cherry picked from commit 712afab) Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Roger Serwy <roger.serwy@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 6c98fce) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 6c98fce) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
…ce" dialog (pythonGH-17593) Co-authored-by: Roger Serwy <roger.serwy@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…ce" dialog (pythonGH-17593) Co-authored-by: Roger Serwy <roger.serwy@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…ce" dialog (pythonGH-17593) Co-authored-by: Roger Serwy <roger.serwy@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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:
bugs.python.org fields:
Linked PRs
The text was updated successfully, but these errors were encountered: