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'. --- reselect | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'reselect') 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