This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年07月29日 20:09 by Sarah, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| SearchDialogPatch.patch | Sarah, 2013年07月29日 20:09 | Patch for 'search' (aka 'find') dialog (will add patch for 'replace' dialog momentarily) | review | |
| ReplaceDialogPatch.patch | Sarah, 2013年07月29日 20:12 | ReplaceDialog patch | review | |
| replace_find_hit.diff | terry.reedy, 2014年12月19日 04:53 | review | ||
| Messages (11) | |||
|---|---|---|---|
| msg193895 - (view) | Author: Sarah (Sarah) * | Date: 2013年07月29日 20:09 | |
In Windows, the 'find' and 'replace' dialogs do not work properly on text that has been commented out using quotation marks. More specifically, the dialog *finds* the text in question, however, it does not *highlight* it. Without the highlighting, a user can't see which text has been found. Since the whole point of the find function is to show the user where the text is located, this is a bug. Credit for the fix goes to Roger Serwy, who suggested raising the hit tag. My patch uses the show_hit function from patch 17511*. I have included the show_hit function, but not the rest of patch 17511. Are there guidelines for submitting patches that utilize elements of other patches? *show_hit is originally from the ReplaceDialog. 17511 added it to SearchDialog |
|||
| msg193897 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2013年07月29日 20:18 | |
Yes, we make the issue have a dependency on the issue it is using. I have done that for this one. |
|||
| msg219546 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2014年06月02日 02:20 | |
I closed #18590 as a duplicate of this. |
|||
| msg228259 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2014年10月02日 21:09 | |
The patch for #17511 did not solve the issue; I proposed a revision in #22179. A patch for that may fix this also. |
|||
| msg232909 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2014年12月18日 22:43 | |
I should note that in msg225543 of #22179, I verified that there is a problem in Replace for highlighting found text within quotes, as well as in keywords, until the dialog is closed. On the other hand, the same text is hihglighted in identifiers, plain code, buildin names, and comments. This might be an issue of stacking order. Merely using replace.show_hit in search also will not solve this. |
|||
| msg232926 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2014年12月19日 04:53 | |
I am narrowing the scope of this issue to Replace dialogs and widening the scope to output as well as edit windows. The attached patch solves the issue as redefined. (It has a temporary hack to pass the unittests.) For edit windows, the problem is that the default tag stacking order seems to be alphabetical. No tag, 'builtin, 'comment', and 'definition, are followed and dominated by 'hit'; 'keyword' and 'string' come after and dominate 'hit'. The solution is to raise 'hit' to the top. The test (from msg225543), which should be added to htest), is that all 6 'i's in "def i(): this list is 'is' # is not" are both found and highlighted. They are with the patch. For output windows, the problem, mentioned in msg225382, is that the 'hit' tag is configured in ColorDelegator, which is not used in output windows. Ths solution, also mentioned there, is to move the configuration to SearchDialogBase. The path does this and Replace dialog Find work for Output Windows. I tested on Windows. I am 99.9% sure there should be no problem on other systems, but would like confirmation on other systems before or after committing an expanded patch with test changes added. |
|||
| msg232929 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2014年12月19日 05:52 | |
Additional notes: Sarah's Replace patch consists of the tag raise. I just verified the reason why it works and moved it to the dialog base to include output windows and soon, Search dialogs. Sarah, if you do not provide a 'family' name, I will list you in Misc/ACKS, in alphabetical position, as just 'Sarah'. Or are you already in that file? Currently, Replace dialog Find hits are tagged with both the 'hit' and the 'sel' tag, which does not show on Windows as long as the dialog is the active window, but apparently does on other systems. Raising the hit tag to the top (either patch) means that the visible highlight on other systems will change from 'selected' to 'found' (which are independently configurable in Idle preferences). If this not desired, the patch could be altered to use tag 'hit' on Windows and 'sel' elsewhere; change 'hit' (on Windows) to 'sel' when the dialog is closed; and configure 'hit' to look like 'sel' (so there is no visible change when closing, as on other systems). On Windows, only one slice can be selected and I presume this is true on other systems. If so, a non-'sel' tag is needed on all systems to tag multiple hits. I would like to auto-highlight all hits in grep output windows and add an explicit 'find in current file' option (though it is possible now by adding the file name to the search path). Raymond, I added you as nosy since this is an appearance change issue that you might possibly have an opinion on, and I would prefer getting it before a change is released in January If I am wrong, un-nosy yourself. |
|||
| msg232990 - (view) | Author: Saimadhav Heblikar (Saimadhav.Heblikar) * | Date: 2014年12月21日 06:54 | |
I tested for the behaviour described in msg193895 before and after your patch. Everything remains same except as what you mentioned. >Currently, Replace dialog Find hits are tagged with both the 'hit' and the 'sel' tag, which does not show on Windows as long as the dialog is the active window, but apparently does on other systems. Raising the hit tag to the top (either patch) means that the visible highlight on other systems will change from 'selected' to 'found' (which are independently configurable in Idle preferences). > >If this not desired, the patch could be altered to use tag 'hit' on Windows and 'sel' elsewhere; change 'hit' (on Windows) to 'sel' when the dialog is closed; and configure 'hit' to look like 'sel' (so there is no visible change when closing, as on other systems). It would be better to ensure that there is no visible change when closing. |
|||
| msg250236 - (view) | Author: Mark Roseman (markroseman) * | Date: 2015年09月08日 16:58 | |
See #24972 for fix |
|||
| msg252840 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2015年10月12日 02:36 | |
#24972 fixes the immediate issue but the Find and Replace code are needlessly different in doing the same thing and redundant in double tagging found text, and there are some other glitches. I think a better fix will be to only use the found tag, but this needs discussion, perhaps on idle-dev. #22179 also has some discussion. |
|||
| msg286396 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2017年01月28日 03:38 | |
Since the original bug for this issue has been fixed, I am closing it in favor of #29392 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:48 | admin | set | github: 62790 |
| 2017年01月28日 03:38:53 | terry.reedy | set | status: open -> closed superseder: IDLE search and replace should use 'hit' tag instead of 'hilite' messages: + msg286396 resolution: fixed stage: test needed -> resolved |
| 2015年10月12日 02:36:45 | terry.reedy | set | messages: + msg252840 |
| 2015年10月12日 02:31:30 | terry.reedy | unlink | issue22179 dependencies |
| 2015年09月08日 16:58:23 | markroseman | set | messages: + msg250236 |
| 2015年09月07日 17:30:48 | markroseman | set | nosy:
+ markroseman |
| 2014年12月21日 06:54:07 | Saimadhav.Heblikar | set | messages: + msg232990 |
| 2014年12月19日 05:52:28 | terry.reedy | set | nosy:
+ rhettinger messages: + msg232929 title: Found text not always highlighted by Replace dialog -> Found text not always highlighted by Replace dialog on Windows |
| 2014年12月19日 04:53:59 | terry.reedy | set | files:
+ replace_find_hit.diff nosy: + Saimadhav.Heblikar title: 'Search' and 'Replace' dialogs don't work on quoted text in Windows -> Found text not always highlighted by Replace dialog messages: + msg232926 stage: patch review -> test needed |
| 2014年12月19日 00:09:19 | terry.reedy | link | issue22179 dependencies |
| 2014年12月19日 00:08:30 | terry.reedy | set | dependencies: - Idle. Search dialog found text not highlited on Windows |
| 2014年12月18日 22:43:27 | terry.reedy | set | assignee: terry.reedy messages: + msg232909 |
| 2014年10月02日 21:09:28 | terry.reedy | set | dependencies:
+ Idle. Search dialog found text not highlited on Windows messages: + msg228259 |
| 2014年06月02日 02:20:56 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg219546 |
| 2014年06月02日 02:20:48 | terry.reedy | link | issue13630 superseder |
| 2013年07月29日 20:18:27 | r.david.murray | set | dependencies:
+ Idle find function closes after each find operation versions: + Python 3.3, Python 3.4 nosy: + r.david.murray messages: + msg193897 resolution: works for me -> (no value) stage: patch review |
| 2013年07月29日 20:12:05 | Sarah | set | files:
+ ReplaceDialogPatch.patch resolution: works for me |
| 2013年07月29日 20:09:25 | Sarah | create | |