Skip to content
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: Find(ed) text is not highlighted while dialog box is open #57839

Closed
marco mannequin opened this issue Dec 19, 2011 · 9 comments
Closed

IDLE: Find(ed) text is not highlighted while dialog box is open #57839

marco mannequin opened this issue Dec 19, 2011 · 9 comments
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@marco
Copy link
Mannequin

marco mannequin commented Dec 19, 2011

BPO 13630
Nosy @terryjreedy, @taleinat, @serwy
Superseder
  • bpo-18590: Found text not always highlighted by Replace dialog on Windows
  • 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 = None
    closed_at = <Date 2014-06-02.02:20:48.938>
    created_at = <Date 2011-12-19.02:13:49.394>
    labels = ['expert-IDLE', 'type-bug']
    title = 'IDLE: Find(ed) text is not highlighted while dialog box is open'
    updated_at = <Date 2014-06-02.02:20:48.937>
    user = 'https://bugs.python.org/marco'

    bugs.python.org fields:

    activity = <Date 2014-06-02.02:20:48.937>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-06-02.02:20:48.938>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2011-12-19.02:13:49.394>
    creator = 'marco'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 13630
    keywords = []
    message_count = 9.0
    messages = ['149811', '149881', '149940', '214368', '218101', '218107', '218155', '218160', '219545']
    nosy_count = 5.0
    nosy_names = ['terry.reedy', 'taleinat', 'roger.serwy', 'marco', 'fgracia']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '18590'
    type = 'behavior'
    url = 'https://bugs.python.org/issue13630'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    @marco
    Copy link
    Mannequin Author

    marco mannequin commented Dec 19, 2011

    Found text does not show at all highlighted on some text colors (like green and orange) when using the find button in the replace dialog box when box is open/visible.

    Then when dialog box is closed it will highlight the found text in black on gray like 'selected' and not in white on black 'found' highlighting color scheme.

    Using F3, to find text, highlights in black on gray like 'selected' and not in white on black 'found' highlighting color scheme

    Also using CTRL+f to find text seems to follow the same improper behavior, just less noticeable since as soon as find button is pressed, the dialog box is closed and the found text is shown, but if the dialog box would not close the text would not be shown with any highlighting at all ('found' nor 'selected' highlighting).

    To test the last behavior I used the find_keep_open.patch to prevent CTRL+f Find Dialog box to close after pressing find button.(bpo-13586)

    Note:
    Color scheme highlighting setting can be seen in IDLE Preferences pane under the Highlighting tab by going to Options/Configure IDLE...

    @marco marco mannequin added topic-IDLE type-bug An unexpected behavior, bug, or error labels Dec 19, 2011
    @serwy
    Copy link
    Mannequin

    serwy mannequin commented Dec 19, 2011

    IDLE does have a color scheme configuration for "found" as listed in the highlighting config dialog and internally as the Tkinter Text tag "hit". This looks like the stubs for functionality that never got implemented.

    Take a look at the SearchBar IDLE extension. It provides incremental searching which highlights all matches.

    @marco
    Copy link
    Mannequin Author

    marco mannequin commented Dec 21, 2011

    Well I checked 'SearchBar' IDLE extension and is not bad... has some minor bugs, nothing major just very very minor quirky behavior, but nothing that seems to impair functionality AFAIK.
    It should be cleaned up and added to release in place of the existing non-functional one.
    Just my 2c, of course.

    @taleinat
    Copy link
    Contributor

    I"m considering updating SearchBar and posting a patch.

    Marco, any chance you could detail the quirks and bugs you experienced when using SearchBar?

    @fgracia
    Copy link
    Mannequin

    fgracia mannequin commented May 8, 2014

    I had problems for installing your *SearchBar*, Tal, in Python 33 and 34 until it downed onto me that in its present form it is only Python 2 compliant. This is then its first weakness, that of course can be easily remedied by applying *2to3.py* to it, as I did. I am using Windows 7.

    Another fault is that when IDLE's editor window is expanded to full screen the bar's widget fills half of it. I imagine that this should not be difficult to mend either.

    If you would be interested in suggestions for your revision, mine would be that the option controls of the *Find* searchbar be disposed in two rows. This would avoid a certain clutter and allow the addition of a new one that, if possible, I would find convenient. It would perform the toggling of the simultaneous highlighting of all the matches of the search, something that is handy in some situations but can be confusing in others.

    These are the only quirks that I have observed until now. I think that *SearchBar* is a must for anyone that uses IDLE's editor in 3.4 or in any previous version of Python (as I have discovered here that the problem is an old one) and am surprised that it does not belong to the standard distribution since it was available.

    Thanks and congratulations for your excellent job.

    @taleinat
    Copy link
    Contributor

    taleinat commented May 8, 2014

    Thanks for the kind words, Francisco! And also for taking the time to get SearchBar working on Python3 and giving it a try.

    I agree that SearchBar is a huge improvement over IDLE's simple find and replace dialogs. And by now every potential user is used to such search interfaces, whereas search dialogs are a thing of the past.

    Regarding your suggestion to split the buttons into a separate line, that would make problems with the replace mode. In the replace mode there are two bars, the first of which is the regular search bar. By adding another bar for controls, that would mean having three bars, and it would be non-obvious to users whether the option refer to the find or replace bar.

    Also, we must be careful not to add many options and controls to the interface, and this is the first time someone has asked to be able to toggle search hit highlighting. If this comes up repeatedly I will consider it.

    @fgracia
    Copy link
    Mannequin

    fgracia mannequin commented May 9, 2014

    The neat program *redemo.py* toggles between *Highlight first match* and *Highlight all matches*.

    @taleinat
    Copy link
    Contributor

    taleinat commented May 9, 2014

    Indeed, redemo.py does include this feature. But it is a completely different application with a very specific goal - testing regular expressions.

    On the other hand, IDLE's search is meant to be used to find pieces of code in the editor, which is a significantly different use case.

    Since SearchBar always sets the pointer to the first match, as well as highlighting it, there would no real point to only mark the first match.

    As for disabling the marking of all other matches (besides the first), what is the point? Does marking all other hits really have any downsides? To me it seems like a useful feature that users will easily grow accustomed to.

    @terryjreedy
    Copy link
    Member

    I currently have the same problem with Idle's builtin Search and Replace dialogs. In that respect, this is a duplicate of bpo-18590. Since the discussion here shifted to a third party extension, I am closing this issue and leaving the other one open.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants