#129 Search Highlighting

open
nobody
None
5
2005-01-11
2004-12-13
TK Soh
No

This patch adds a "Highlight All" checkbox to the Find
dialog:

- when checked, will cause all search matches to be
highlighted. Highlighting begins when user clicks on
the "Find" button.
- Previous highlights will be cleared before beginning a
new search of different search string and/or search
type.
- To cleared the highlights explicitly, uncheck
the "Highlight All" checkbox.
- The "Highlight All" checkbox will toggle automatically to
reflex the highlighting state of the active tab.
- the default highlighting color is yellow, which can be
changed with "nedit.searchHiliteColor" resource.

Some sample snapshots has be uploaded.

The highlighting algorithm used in this patch has been
adapted from Andrew Hood's find_all() macro.

Discussion

<< < 1 2 (Page 2 of 2)
  • TK Soh
    TK Soh
    2004-12-17

    Logged In: YES
    user_id=411637

    Version 3.0 adds highlighting to i-search, enabled
    by "Pref>Searching>Highlight_Incremental_Search"

     
  • TK Soh
    TK Soh
    2004-12-17

    patch v3.0: with i-search highlighting

     
  • TK Soh
    TK Soh
    2005-01-11

    Logged In: YES
    user_id=411637

    patch v4.0:

    1. feature progressive search highlight - search and
    highlight as text are modified or replaced. (Warning:
    efficient may vary depending on the search pattern. -O2 is
    recommended)

    2. support highlighting on Find-Selection and Find-Same.

    3. the "Highlight" button no longer toggle when switching
    tabs, but unchecking it will still clear the search
    highlight in the current tab.

    4. Search highlight is stored in a 'priority' rangeset, so
    it will not be obscured by other rangesets.

     
  • TK Soh
    TK Soh
    2005-01-11

    • summary: "Highlight All" checkbox in Find dialog --> Search Highlighting
     
  • TK Soh
    TK Soh
    2005-01-11

    patch v4.0: with progressive search highlight

     
  • TK Soh
    TK Soh
    2005-05-05

    patch v4.1: fixed coredump

     
  • TK Soh
    TK Soh
    2005-06-07

    patch v4.2: more coredump fixes

     
    Attachments
  • TK Soh
    TK Soh
    2005-06-07

    Logged In: YES
    user_id=411637

    uploaded patch v4.2 with coredump fix - I haven't seen one
    for a good while.

     
  • Joerg Fischer
    Joerg Fischer
    2007-05-16

    Logged In: YES
    user_id=918104
    Originator: NO

    There seems to be a conflict with the rangesets created or destroyed via the macro interface. Do a search with the "Highlight All" checkbox on, so that a rangeset is created (ie if there are matches for the search string). Then run the one line macro

    rangeset_destroy($rangeset_list)

    Then the rangeset of the Find dialog is lost. If you repeat the search now, so that there are matches, nedit crashes.

     
<< < 1 2 (Page 2 of 2)