aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-11-28 11:50:05 +0100
committerAnton Khirnov <anton@khirnov.net>2021-11-28 11:50:05 +0100
commite55cfe32b05f8adeae9873ca0b9092a7b5113b38 (patch)
tree212b1114d49d35ecee2a1da9b0f5c071851eaf66
parent6a49efb858649bfe1f8a1ffa41df7208a3f0969b (diff)
Consistently refer to hints as hints.
Avoid introducing the term 'label'.
-rw-r--r--README8
-rw-r--r--reselect12
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.<n> define a custom pattern, which will be available
as the 'user.<n>' 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;
}
}