fastmod icon indicating copy to clipboard operation
fastmod copied to clipboard

Feature request: match and replacement word highlighting within the replacement preview diff

Open LeoniePhiline opened this issue 2 years ago • 2 comments

At times, a line contains multiple matches.

Fastmod thus presents the line multiple times, once for each match and replacement within the line.

It can be difficult to see where exactly something is being replaced, especially when replacing matches in very long lines. (think minification test fixtures, but much shorter lines can also benefit from word highlighting)

A rather extreme example (pixellated, but the point should become obvious): grafik

The individual match and replacement should be highlighted within the red and green lines.

LeoniePhiline avatar Dec 16 '23 17:12 LeoniePhiline

This would be very helpful, even in a less extreme situation. If you're making a small change, like "Jns" to "Jus", those can take a bit to find within the diff, even with the line highlighted in different colors.

Image

On the command line, fixing this could be as easy as bolding the found and replaced instance(s) on a given line.

nk9 avatar Sep 25 '25 14:09 nk9

Note that the accepted PR does character-level diff highlighting. Hopefully that's enough to close this issue.

nk9 avatar Oct 05 '25 23:10 nk9