url-select: updated README, on_line_update -> line_update

This commit is contained in:
Bert 2010-08-17 20:41:12 +02:00
parent 91cd34f1a1
commit ec0f6210f4
2 changed files with 17 additions and 19 deletions

View File

@ -46,11 +46,11 @@ After installing, put the folling lines in your .Xdefaults:
Use Meta-u to activate URL selection mode, then use the following keys:
k: select next upward URL (also with Meta-u)
j: select next downward URL
Return: open selected URL in browser and quit selection mode
y: copy (yank) selected URL and quit selection mode
Escape: cancel URL selection mode
k: Select next upward URL (also with Meta-u)
j: Select next downward URL
o/Return: Open selected URL in browser, Return: deactivate afterwards
y: Copy (yank) selected URL and deactivate selection mode
q/Escape: Deactivate URL selection mode
Options:

View File

@ -46,17 +46,16 @@ sub on_start {
# read resource settings
$self->{browser} = $self->x_resource('urlLauncher') || 'x-www-browser';
if ($self->x_resource('underlineURLs') eq 'true') {
$self->{underline} = 1;
$self->enable(line_update => \&line_update);
}
()
}
sub on_line_update {
sub line_update {
my ($self, $row) = @_;
if ($self->{underline}) {
my $line = $self->line($row);
my $text = $line->t;
my $rend = $line->r;
@ -71,7 +70,6 @@ sub on_line_update {
}
$line->r($rend);
}
}
()
}