GermainZ / weechat-vimode

A WeeChat script that adds vi-like modes, commands and keybindings.
GNU General Public License v3.0
266 stars 28 forks source link

encode/decode errors for specific yanks #61

Closed oldsouless closed 6 years ago

oldsouless commented 6 years ago

weechat 2.2 from brew --with-perl --with-ruby --with-lua --with-curl --with-python@2 weechat-vimode .7 from git python 2.7.15 from brew

no problem yanking directionally: y{count}{h|l} works as expected but y$ and y0 return:

python: stdout/stderr (vimode): UnicodeDecodeError: 'ascii' codec can't decode byte 0xee in position 389: ordinal not in range(128) python: error in function "cb_key_combo_default"

GermainZ commented 6 years ago

I can't seem to reproduce this (also Python 2.7.15). Does this happen with any input line?

oldsouless commented 6 years ago

no; seems to be tied to the input itself. Is this expected behavior for certain bytes? First encountered trying to yank long /input lines but can also reproduce with /trigger lines.

oldsouless commented 6 years ago

Can confirm that by parsing out the bytes it isn't happy with then the yank will proceed as normal; that's an adequate solution for me.

GermainZ commented 6 years ago

Can you please post an example input so I can reproduce and fix the issue? (Or the code solution if you figured it out.)

Thanks!

oldsouless commented 6 years ago

Sure; the following seemed to break my /input and /trigger yanks:  (any series of characters before or after will do).