tmux-plugins / tmux-copycat

A plugin that enhances tmux search
MIT License
1.11k stars 63 forks source link

it doesn't highlight the match exactly when the terminal prompt has special char or signs #61

Closed stephencheng closed 9 years ago

stephencheng commented 9 years ago

case 1:

try to use ctrl-u to search URL, got the selected highlight shift 3 chars to right,

exapmle:

Ξ ~CM_CONF_DIR → curl http://www.google.com 2nd line

it suppose to match from http to com, however it match starting from p:// to 2nd in the next line

case 2:

same like above,

↑127 ~CM_CONF_DIR → echo http://www.google.com 2nd line

it matchs starting from p:// to 2nd

bruno- commented 9 years ago

Hey, thank you for reporting. This is due to somewhat shabby support for non-ASCII characters. I was also able to reproduce this in some occasions.

Patch for this is welcome.

bruno- commented 9 years ago

Hi, this issue was fixed by @metcalfc in #66.

The problem was in using awk because it appears it doesn't handle multi-byte characters well.

To fix the problem:

I was able to verify this is now fixed so I'll close this issue, but please try it out and let me know.