aboutsummaryrefslogtreecommitdiff
path: root/reselect
diff options
context:
space:
mode:
Diffstat (limited to 'reselect')
-rw-r--r--reselect7
1 files changed, 4 insertions, 3 deletions
diff --git a/reselect b/reselect
index 081a44f..760d9b8 100644
--- a/reselect
+++ b/reselect
@@ -147,6 +147,8 @@ sub on_action {
$self->get_rend("prompt", urxvt::OVERLAY_RSTYLE), 0);
$url_picker->{prompt}->set(0, 0, $prompt);
+ $url_picker->{prompt_len} = length $prompt;
+
$url_picker->{results} = $results;
$url_picker->{buffer} = '';
my ($crow,$ccol) = $self->screen_cur;
@@ -193,9 +195,8 @@ sub on_key_press {
sub update {
my ($self, $p) = @_;
- $p->{typing} = $self->overlay(
- 8, -1, length($p->{buffer}), 1, $self->get_rend("input", urxvt::DEFAULT_RSTYLE), 0
- );
+ $p->{typing} = $self->overlay($p->{prompt_len}, -1, length($p->{buffer}), 1,
+ $self->get_rend("input", urxvt::DEFAULT_RSTYLE), 0);
$p->{typing}->set(0,0,$p->{buffer});
my $results = $p->{results};