ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/urxvt.pm
(Generate patch)

Comparing rxvt-unicode/src/urxvt.pm (file contents):
Revision 1.238 by root, Sun May 18 18:15:04 2014 UTC vs.
Revision 1.241 by sf-exg, Fri Oct 10 14:38:02 2014 UTC

555no warnings 'utf8'; 555no warnings 'utf8';
556 556
557sub parse_resource { 557sub parse_resource {
558 my ($term, $name, $isarg, $longopt, $flag, $value) = @_; 558 my ($term, $name, $isarg, $longopt, $flag, $value) = @_;
559 559
560 $name =~ y/-/./ if $isarg;
561
562 $term->scan_extensions; 560 $term->scan_extensions;
563 561
564 my $r = $term->{meta}{resource}; 562 my $r = $term->{meta}{resource};
565 keys %$r; # reset iterator 563 keys %$r; # reset iterator
566 while (my ($pattern, $v) = each %$r) { 564 while (my ($k, $v) = each %$r) {
567 if ( 565 my $pattern = $k;
566 $pattern =~ y/./-/ if $isarg;
567 my $prefix = $name;
568 my $suffix;
568 $pattern =~ /\.$/ 569 if ($pattern =~ /\-$/) {
569 ? $pattern eq substr $name, 0, length $pattern 570 $prefix = substr $name, 0, length $pattern;
570 : $pattern eq $name 571 $suffix = substr $name, length $pattern;
571 ) { 572 }
573 if ($pattern eq $prefix) {
572 $name = "$urxvt::RESCLASS.$name"; 574 $name = "$urxvt::RESCLASS.$k$suffix";
573 575
574 push @{ $term->{perl_ext_3} }, $v->[0]; 576 push @{ $term->{perl_ext_3} }, $v->[0];
575 577
576 if ($v->[1] eq "boolean") { 578 if ($v->[1] eq "boolean") {
577 $term->put_option_db ($name, $flag ? "true" : "false"); 579 $term->put_option_db ($name, $flag ? "true" : "false");
682 if ($_ eq "default") { 684 if ($_ eq "default") {
683 685
684 $ext_arg{$_} = [] 686 $ext_arg{$_} = []
685 for 687 for
686 qw(selection option-popup selection-popup readline), 688 qw(selection option-popup selection-popup readline),
689 @{ delete $TERM->{perl_ext_3} },
687 map $_->[0], values %{ $TERM->{meta}{binding} }, 690 map $_->[0], values %{ $TERM->{meta}{binding} };
688 @{ delete $TERM->{perl_ext_3} };
689 691
690 for ($TERM->_keysym_resources) { 692 for ($TERM->_keysym_resources) {
691 next if /^(?:string|command|builtin|builtin-string|perl)/; 693 next if /^(?:string|command|builtin|builtin-string|perl)/;
692 next unless /^([A-Za-z0-9_\-]+):/; 694 next unless /^([A-Za-z0-9_\-]+):/;
693 695
694 my $ext = $1; 696 my $ext = $1;
695 $ext =~ y/-/_/;
696 697
697 $ext_arg{$ext} = []; 698 $ext_arg{$ext} = [];
698 } 699 }
699 700
700 } elsif (/^-(.*)$/) { 701 } elsif (/^-(.*)$/) {
1499to the locale-specific encoding using C<< $term->locale_encode >>. 1500to the locale-specific encoding using C<< $term->locale_encode >>.
1500 1501
1501=item $term->tt_write_user_input ($octets) 1502=item $term->tt_write_user_input ($octets)
1502 1503
1503Like C<tt_write>, but should be used when writing strings in response to 1504Like C<tt_write>, but should be used when writing strings in response to
1504the user pressing a key, to invokes the additional actions requested by 1505the user pressing a key, to invoke the additional actions requested by
1505the user for that case (C<tt_write> doesn't do that). 1506the user for that case (C<tt_write> doesn't do that).
1506 1507
1507The typical use case would be inside C<on_action> hooks. 1508The typical use case would be inside C<on_action> hooks.
1508 1509
1509=item $term->tt_paste ($octets) 1510=item $term->tt_paste ($octets)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines