From e55cfe32b05f8adeae9873ca0b9092a7b5113b38 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 28 Nov 2021 11:50:05 +0100 Subject: Consistently refer to hints as hints. Avoid introducing the term 'label'. --- README | 8 ++++---- reselect | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README b/README index 97deaf3..c83e08c 100644 --- a/README +++ b/README @@ -58,10 +58,10 @@ URxvt.reselect.order "descending" to assign hints in reverse order URxvt.reselect.pattern. define a custom pattern, which will be available as the 'user.' action -URxvt.reselect.input.backgroundColor Bg color for numbers typed -URxvt.reselect.input.foregroundColor Fg color for numbers typed -URxvt.reselect.label.backgroundColor Bg color for numbered labels -URxvt.reselect.label.foregroundColor Fg color for numbered labels +URxvt.reselect.input.backgroundColor Bg color for characters typed +URxvt.reselect.input.foregroundColor Fg color for characters typed +URxvt.reselect.hint.backgroundColor Bg color for the hint overlays +URxvt.reselect.hint.foregroundColor Fg color for the hint overlays URxvt.reselect.prompt.backgroundColor Bg color for "Follow:" prompt URxvt.reselect.prompt.foregroundColor Fg color for "Follow:" prompt URxvt.reselect.status.backgroundColor Bg color for status messages diff --git a/reselect b/reselect index 98524c8..c1cdb7c 100644 --- a/reselect +++ b/reselect @@ -93,7 +93,7 @@ sub place_hint { sub build_overlays { my ($self, $pattern, $text, $rowmap) = @_; - my $label_rend = $self->get_rend("label", urxvt::OVERLAY_RSTYLE); + my $hint_rend = $self->get_rend("hint", urxvt::OVERLAY_RSTYLE); my $res = find_matches($pattern, $text, $rowmap); my @matches = @{$res->{matches}}; @@ -117,14 +117,14 @@ sub build_overlays { ($col, $row) = place_hint($col, $row, $hint_w); if (not exists $results->{$hint}) { - $results->{$hint} = { match => $match, labels => [] }; + $results->{$hint} = { match => $match, overlays => [] }; } # create the overlay and add it to the list of overlays for this hint - my $overlay = $self->overlay($col, $row, $hint_w, 1, $label_rend, 0); + my $overlay = $self->overlay($col, $row, $hint_w, 1, $hint_rend, 0); $overlay->set(0, 0, $hint); - push(@{$results->{$hint}->{labels}}, $overlay); + push(@{$results->{$hint}->{overlays}}, $overlay); } return $results; @@ -223,12 +223,12 @@ sub update { my $result = $results->{$_}; if ($len == 0 || index($_, $p->{buffer}) == 0) { - for my $overlay (@{$result->{labels}}) { + for my $overlay (@{$result->{overlays}}) { $overlay->show; } unshift @matches, $result->{match}; } else { - for my $overlay (@{$result->{labels}}) { + for my $overlay (@{$result->{overlays}}) { $overlay->hide; } } -- cgit v1.2.3