de-vri-es / weechat-autosort

Automatically keep your buffers sorted.
GNU General Public License v3.0
76 stars 8 forks source link

Fix 'buffer_sort_key(rules)' bug #7

Closed alem0lars closed 7 years ago

alem0lars commented 7 years ago

Fixes issue #6

I've tried to load the plugin and it seems to work now.

de-vri-es commented 7 years ago

Thans for looking into it. That decode was needed for python 2 though, when there are buffer names with utf-8 in them. It would seem that in python 3 the buffer names already are decoded (probably the type is always str which is bytes in python 2 and unicode in python 3). I guess the easiest solution is to only do the decode in python 2.

de-vri-es commented 7 years ago

Added an optional decode step for python 2. Thanks for the PR.