Skip to content

Commit

Permalink
Fix displaying of non-latin symbols in tab title
Browse files Browse the repository at this point in the history
  • Loading branch information
Illya Klymov committed Sep 8, 2011
1 parent f9490d8 commit 4257d19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tabbedex
Expand Up @@ -68,7 +68,7 @@
## to other extension packages if the mouse was not over the urxvt
## window.
##

use Encode qw(decode);

sub update_autohide {
my ($self, $reconfigure) = @_;
Expand Down Expand Up @@ -141,7 +141,7 @@ sub refresh {
my $term = $self->{term};
my @str = $term->XGetWindowProperty($term->parent, $self->{tab_title});
if (@str && $str[2]) {
my $str = '| ' . $str[2];
my $str = '| ' . decode("utf8", $str[2]);
my $len = length $str;
$len = $ncol - $ofs if $ofs + $len > $ncol;
substr $text, $ofs, $len, substr $str, 0, $len;
Expand Down Expand Up @@ -384,7 +384,7 @@ sub on_start {
} while @argv && $argv[0] ne "-e";

if ($self->{tab_title}) {
$self->{tab_title} = $self->{term}->XInternAtom("WM_NAME", 1);
$self->{tab_title} = $self->{term}->XInternAtom("_NET_WM_NAME", 1);
}

$self->new_tab (@argv);
Expand Down

0 comments on commit 4257d19

Please sign in to comment.