zsh-users / zsh-history-substring-search

🐠 ZSH port of Fish history search (up arrow)
2.61k stars 156 forks source link

fix search match highlight with latest z-sy-h #152

Closed Koston-0xDEADBEEF closed 11 months ago

Koston-0xDEADBEEF commented 12 months ago

This fixes match portion highlighting when using latest zsh-syntax-highlighting widget.

~Fixes~ Concerns #131

~Disclaimer: I'm not quite sure why this works, or how it's supposed to work. Feel free to modify this patch as you see fit.~

~This is definitely not a proper fix, just poorly masking some issue elsewhere. I'm leaving it here for now, but it shouldn't be merged.~

This should now be good for review. As far as a workaround goes, anyway.

Koston-0xDEADBEEF commented 12 months ago

A bug still remains; any matched portion of command line highlighted by history-substring-search, but not highlighted by z-sy-h does not get reverted after leaving search. This can be ad-hoc fixed by having latter highlight everything via switching any "none" highlights to explicit defaults.