… | |
… | |
41 | qr{^"([^\\"'\ \t|&;<>()*?]+)"$}, # "simple" => simple |
41 | qr{^"([^\\"'\ \t|&;<>()*?]+)"$}, # "simple" => simple |
42 | qr{^(.*)[,\-]$}, # strip off trailing , and - |
42 | qr{^(.*)[,\-]$}, # strip off trailing , and - |
43 | ); |
43 | ); |
44 | |
44 | |
45 | sub on_sel_extend { |
45 | sub on_sel_extend { |
46 | my ($self) = @_; |
46 | my ($self, $time) = @_; |
47 | |
47 | |
48 | my ($row, $col) = $self->selection_mark; |
48 | my ($row, $col) = $self->selection_mark; |
49 | my $line = $self->line ($row); |
49 | my $line = $self->line ($row); |
50 | my $text = $line->t; |
50 | my $text = $line->t; |
51 | my $markofs = $line->offset_of ($row, $col); |
51 | my $markofs = $line->offset_of ($row, $col); |
… | |
… | |
72 | push @matches, [$ofs, length $match]; |
72 | push @matches, [$ofs, length $match]; |
73 | } |
73 | } |
74 | } |
74 | } |
75 | } |
75 | } |
76 | |
76 | |
|
|
77 | # whole line |
|
|
78 | push @matches, [0, ($line->end - $line->beg + 1) * $self->ncol]; |
|
|
79 | |
77 | for (sort { $a->[1] <=> $b->[1] or $b->[0] <=> $a->[0] } @matches) { |
80 | for (sort { $a->[1] <=> $b->[1] or $b->[0] <=> $a->[0] } @matches) { |
78 | my ($ofs, $len) = @$_; |
81 | my ($ofs, $len) = @$_; |
79 | |
82 | |
80 | next if $len <= $curlen; |
83 | next if $len <= $curlen; |
81 | |
84 | |
82 | $self->selection_beg ($line->coord_of ($ofs)); |
85 | $self->selection_beg ($line->coord_of ($ofs)); |
83 | $self->selection_end ($line->coord_of ($ofs + $len)); |
86 | $self->selection_end ($line->coord_of ($ofs + $len)); |
84 | return 1; |
87 | return 1; |
85 | } |
88 | } |
86 | |
89 | |
87 | # whole line |
90 | () |
88 | $self->selection_beg ($line->beg, 0); |
|
|
89 | $self->selection_end ($line->end, $self->ncol); |
|
|
90 | |
|
|
91 | return 1; |
|
|
92 | } |
91 | } |