emacs-evil / emacs-evil/evil

Search highlights not refreshed after buffer-modifying commands (paste, undo, redo)

Open
#2,020 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
3.9k
Forks
307
PR merge metrics
No merged PRs in 30d

Description

Search highlighting provided by `evil-search` is not updated after certain buffer modifications such as paste, undo, and redo. This results in stale or incorrect highlight overlays that no longer correspond to the current buffer contents.

## Steps to Reproduce

1. Enable `evil-mode` with `evil-search` as the search module.
2. Perform a search using `/` so matches are highlighted.
3. Modify the buffer using one of the following commands:

* `evil-paste-after`
* `evil-paste-before`
* `evil-visual-paste`
* `evil-undo`
* `evil-redo`
4. Observe the search highlights.

## Expected Behavior
Search highlights should be recalculated and updated to reflect the current buffer contents after any modification.

## Actual Behavior
Search highlights remain unchanged after the buffer is modified, leading to incorrect or misplaced highlighting.

Contributor guide

Open the contributing guide

Research direction

Start with the evil-search search-highlighting implementation and trace how evil-paste-after, evil-paste-before, evil-visual-paste, evil-undo, and evil-redo modify the buffer. Reproduce the issue by searching, running each command, and inspecting the overlays. Done means highlights are recalculated after each listed modification and match the current buffer contents.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.