diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-06-08 21:03:15 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-06-08 21:03:15 +0200 |
commit | 16e0bae05dd051e266f5579912c13c6da2441aa1 (patch) | |
tree | bd6427635ea51577c81f809c30ddd586750ed925 | |
parent | f44da2513c1ae4330ea698e9144fe52f9943ad44 (diff) |
Fix typed-text overlay placement.
-rw-r--r-- | reselect | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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}; |