Skip to content

Don't jump to invisible text #117

@joostkremers

Description

@joostkremers

The consult package has a command consult-focus-lines that hides lines by applying a user-defined filter. The hidden lines are still in the buffer, they're just made invisible using overlays (IIUC).

If I start searching in such a filtered buffer with ctrlf and move through the matches with a repeated C-s, point jumps to the invisible matches as well, which means that you lose point, because the cursor becomes invisible.

isearch doesn't have the same issue, point only moves to the visible matches.

What would also be nice is if the match count could show not only the current match and the total number of matches, but also the number of (in)visible matches, e.g., by showing something like [5/40] (20 hidden) in the match count.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions