Skip to content

Feature request: Visually mark positions of lines highlighted by Highlighter on scrollbar #27

Closed
1 of 1 issue completed

Description

@ferenczy

I have a feature request: it would be useful if LogExpert could mark scrollbar with visual indicators of lines highlighted using Highlighter. You may see such feature in Visual Studio IDE or Chrome browser for example - when you search for a text on a page, positions of searched term occurrences are visually marked on the scrollbar.

It doesn't have to necessarily be marked directly on the scrollbar, for example Glogg has a separate vertical bar right next to the scrollbar for this purpose.

BTW LogExpert is the best application for working with logs I have found. And I have tried several various applications. Keep going! :)

Activity

  1. zarunbal commented on Feb 15, 2018

    @zarunbal
    Collaborator

    Thanks for your input. Just a quick idea would be to extend the Time line control on the left side with search information.

  2. pbodnar commented on Feb 20, 2020

    @pbodnar

    100% agreed with @ferenczy. Compared to Glogg, LogExpert is much more feature-rich, but I really miss this scrollbar-marks feature of Glogg. It helps one to quickly visually evaluate frequency and "occurrence patterns" of the searched lines... Isn't this feature on a near future todo-list yet?

  3. Hirogen commented on Jun 24, 2026

    @Hirogen
    Member

    TimeSpread has a similar view

    TimeSpreadView_1

    so this should look like this

    1. Highlights
    2. Bookmarks
    3. Search Hits
    4. Filter hits
      should all be configurable
  4. Hirogen commented on Sep 7, 2026

    @Hirogen
    Member

    Implementation brief

    Category: Enhancement
    Summary: Add a configurable vertical marker bar showing highlights, bookmarks, search hits, and filter hits across the current log.

    Current behavior

    Time Spread provides a similar visual control with tooltips and click-to-navigate behavior, but its data and positioning are coupled to timestamp calculations.

    Bookmarks and filter hits already have line indexes. Highlighting has reusable matching logic, but no complete index of all highlighted lines. Log Search currently finds the next or previous match rather than collecting all matches.

    The feature is feasible. The main complexity is discovering matches and keeping markers accurate without slowing down large or actively growing logs.

    These findings are based on source inspection; runtime and performance verification remain part of implementation.

    Desired behavior

    Add a dedicated marker bar beside the main log grid:

    • Work with logs both with and without timestamps.
    • Position markers proportionally by logical line number, from the first loaded line at the top to the last at the bottom.
    • Allow highlights, bookmarks, search hits, and filter hits to be enabled independently.
    • Use separate lanes for the four sources so one category cannot obscure another.
    • Allow the entire bar to be hidden.
    • Persist visibility preferences through the existing preferences system.
    • Keep Time Spread independently available, with its existing behavior.
    • Clicking a marker selects and reveals a corresponding line in the main log grid and disables follow-tail.
    • Hovering over a marker shows its category, represented line range, and matching-line count.

    Marker-source rules

    Highlights

    • Include lines matching visual rules in the Log Window's active Highlight Group.
    • Include both whole-line and word highlights.
    • Exclude temporary highlights from this initial implementation; search matches have their own lane.
    • Exclude rules that only perform trigger actions without visual highlighting.
    • When several visual rules match a line, use the first matching visual rule in group order to determine its marker color.
    • Prefer the rule's background color when it supplies background highlighting; otherwise use its foreground color.
    • Refresh when the active group or its rules change.
    • Match using the same text and case/regex semantics as existing highlighting.

    Bookmarks

    • Include both manual and automatically generated bookmarks.
    • Update after additions, removals, clearing, session restoration, and rollover shifts.
    • Displaying markers must not create or modify bookmarks.

    Search hits

    • Show every matching line for the latest executed Ctrl+F search in that Log Window.
    • Preserve its text, regex, and case-sensitivity settings.
    • F3 and Shift+F3 navigation must not restart a full scan when the search criteria have not changed.
    • A new executed search replaces the previous marker set.
    • Provide a way to clear search markers.
    • Check newly appended lines against the active search while its markers are enabled.
    • Invalid patterns or regex timeouts must end the affected scan gracefully and use existing error-reporting conventions.

    Filter hits

    • Show actual matches from the current Window Filter.
    • Exclude lines included only by Back Spread or Fore Spread.
    • Use the existing filter execution results rather than independently reevaluating the filter.
    • Update when filtering completes, is cleared, or receives new tail matches.
    • If filtering is cancelled or fails with partial results, show only the hits actually produced.

    Aggregation and navigation

    Multiple matching lines will frequently map to the same vertical pixel:

    • Aggregate every matching line into its corresponding pixel bucket; do not sample lines and accidentally omit isolated matches.
    • Count matching lines, not individual word occurrences.
    • For highlight buckets containing several colors, use the highest-priority matching rule according to group order.
    • Clicking a populated bucket navigates to the matching line nearest the bucket's midpoint; break ties using the lower line number.
    • Clicking an empty bucket does nothing.
    • Handle empty files, single-line files, and very small control sizes without division-by-zero or invalid selection errors.
    • Recalculate pixel buckets on resize using cached marker data, without rescanning file contents.

    Relevant implementation points

    Locate these types and methods in the current codebase before editing:

    • TimeSpreadingControl and TimeSpreadCalculator
      Existing examples of compact visualization, tooltips, and navigation events. Keep marker data independent of their timestamp calculations.

    • LogWindow and its grid layout
      Host the bar, connect the marker sources, and route navigation to the correct Log Window.

    • HighlightEvaluator, FindHighlightEntry, and FindHighlightMatches
      Existing matching and display semantics to reconcile with marker classification. Preserve case sensitivity, regex behavior, and rule ordering.

    • HighlightBookmarkScanner
      An example of cancellable bulk scanning. It only handles bookmark-producing rules and is not a general highlight-marker index.

    • BookmarkDataProvider and Log Window bookmark notifications
      Sources for bookmark positions and updates. Account for bulk replacement during restoration, not only individual add/remove events.

    • LogSearcher, SearchParams, and the Log Window search path
      Provide matching semantics and the executed-search lifecycle. Add collection of all matching lines without changing existing next/previous navigation behavior.

    • FilterRun.HitLines and LogWindow._filterHitList
      Sources for actual filter matches. Do not substitute ResultLines or _filterResultList, which also include Filter Spread context.

    • Tail Follow Sink callbacks and the load/reload lifecycle
      Update appended lines, invalidate obsolete data, and shift or rebuild markers when rollover changes line positions.

    • Preferences, the Settings dialog, and localization resources
      Persist source visibility and bar visibility using established conventions.

    Keep matching/index management and line-to-pixel aggregation testable independently of WinForms. The control should render prepared data rather than read or scan the log.

    Performance and lifecycle requirements

    • Never run full-file matching from a paint handler or on the UI thread.
    • Use cancellable background scans with snapshots of the relevant rules/search criteria.
    • Associate results with the file/load generation and criteria that produced them. Discard obsolete results.
    • Process appended lines incrementally; batch UI refreshes during heavy tail activity.
    • Rebuild or shift indexes correctly after rollover, truncation, and reload.
    • Cancel work and release subscriptions/resources when the Log Window closes.
    • Avoid holding application locks for an entire file scan.
    • Avoid allocating one UI object or drawing resource per match.
    • Show when marker discovery is in progress so an incomplete bar is not mistaken for a complete overview.
    • Do not start highlight/search scans solely for marker sources that are disabled. Re-enable them with a fresh index when needed.
    • Overview scans must never invoke highlight triggers: audio, plugins, stop-tail, bookmark creation, or LED changes.

    Acceptance criteria

    • All four sources can be toggled independently, and visibility preferences survive restart.
    • The bar works without a timestamp-capable Columnizer and can coexist with Time Spread.
    • Highlight markers follow the specified matching, rule-order, and color policies.
    • Bookmark markers reflect manual changes, automatic bookmarks, restoration, and rollover.
    • Search markers represent all matches for the latest executed search and update for appended lines.
    • Filter markers exclude context-only lines.
    • Isolated matches remain visible when many lines map to one pixel.
    • Bucket counts, tooltips, and click targets follow the specified aggregation rules.
    • Navigation selects the correct logical line and stops follow-tail.
    • Resizing recalculates rendering without rescanning file contents.
    • Rule changes, new searches, reloads, and rollover cannot publish stale scan results.
    • Empty files, single-line files, cancellation, regex failures, and window closure are handled safely.
    • Marker generation never fires highlight triggers.
    • Automated tests cover matching/classification, aggregation, navigation mapping, invalidation, and incremental updates.
    • Windows UI checks cover DPI scaling, light/dark themes, resizing, hidden/restored tabs, and Time Spread coexistence.
    • Performance checks cover a large file with dense matches, multiple regex rules, and active appends. Record file size, line count, rule count, scan duration, memory overhead, and UI responsiveness in the implementation report.

    Scope boundaries and caveats

    The initial bar describes the main log grid of its owning Log Window. A Filter Pipe Log Window may have its own bar using that window's logical lines; a separate bar for the secondary filter-result grid is outside this scope.

    Combined rollover files use the same logical line numbering as the main grid. Mapping external physical-file line numbers is outside this scope.

    This feature does not add timestamp-positioned markers, native scrollbar customization, or new highlight trigger behavior.

    Full highlight/search discovery requires reading the relevant log content. Background scanning keeps the UI responsive but does not eliminate CPU, I/O, or memory costs.

    Estimated difficulty: Moderate to substantial. Rough estimate for the four-source implementation: 8–15 developer days including automated tests, performance checks, and Windows UI verification.

  5. Hirogen commented on Sep 17, 2026

    @Hirogen
    Member
    image Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Featurewhat a great ideaenhancementthis will make things better

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions