tmux-thumbs
tmux-thumbs copied to clipboard
Matched strings get displaced when preceded by multi-byte utf8 chars
Like the title and [screenshot](https://i.imgur.com/Fd2DRbp.png suggests, matched text gets displaced when some multi-byte char(s) is(are) present in the line containg the match. As you can see from the screenshot, the same string is matched on the prompt line and the output line, but only the former is displaced. Here the arrow character at the end of the prompt is multi-byte, perhaps the "unticked box" char as well. Anyways, every time a multi-byte char is present on a line, this happens.
My wild guess would be some computation error in the match index. I've tried looking at the code, but unfortunately, I don't speak rust at all.
Let me know if this would be something that would warrant a fix.
It is a known issue, without a clear solution. https://github.com/fcsonline/tmux-thumbs/issues/76
One workaround seems to be to actually not render those chars at all in the thumbs pane, that way, the problem doesn't exist, and since those chars are mostly uneeded in the regexps we'd want to match either way, I don't see a problem with that. Maybe as an option.