aboutsummaryrefslogtreecommitdiffstats
path: root/weechat
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2017-06-01 18:55:07 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2017-06-01 18:55:07 +0200
commitd3318d4d28e9a4e2d08b3e4a1c7d5e313c8af5f7 (patch)
tree558b732d1de5f555d7993cb6cf1c6bcc10b468cc /weechat
parent061a9bb8995b8f87f495df3fcb5c7bb9254a6368 (diff)
downloaddotfiles-d3318d4d28e9a4e2d08b3e4a1c7d5e313c8af5f7.tar.xz
weechat: buffers.pl: 5.5 -> 5.6
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'weechat')
-rw-r--r--weechat/perl/buffers.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/weechat/perl/buffers.pl b/weechat/perl/buffers.pl
index 600ab40..46e2460 100644
--- a/weechat/perl/buffers.pl
+++ b/weechat/perl/buffers.pl
@@ -20,6 +20,8 @@
#
# History:
#
+# 2017-03-17, arza <arza@arza.us>:
+# v5.6: fix truncating buffer names that contain multibyte characters
# 2017-02-21, arza <arza@arza.us>:
# v5.5: fix memory leak in perl 5.23.7-5.24.1
# fix truncation and crop_suffix when truncating to 1-4 characters
@@ -177,7 +179,7 @@ use strict;
use Encode qw( decode encode );
# -----------------------------[ internal ]-------------------------------------
my $SCRIPT_NAME = "buffers";
-my $SCRIPT_VERSION = "5.5";
+my $SCRIPT_VERSION = "5.6";
my $BUFFERS_CONFIG_FILE_NAME = "buffers";
my $buffers_config_file;
@@ -1056,7 +1058,7 @@ sub format_name
weechat::color($fg).
weechat::color(",$bg").
truncate_end($name, $maxlength-2).
- (length($name) > $maxlength-2 ? $crop_suffix : "").
+ (length(Encode::decode_utf8($name)) > $maxlength-2 ? $crop_suffix : "").
weechat::color( weechat::config_color($options{"color_number_char"}) ).
")";
}
@@ -1065,7 +1067,7 @@ sub format_name
$output = weechat::color($fg).
weechat::color(",$bg").
truncate_end($name, $maxlength).
- (length($name) > $maxlength && $maxlength > 0 ? $crop_suffix : "");
+ (length(Encode::decode_utf8($name)) > $maxlength && $maxlength > 0 ? $crop_suffix : "");
}
return $output;