-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: b67e64aab60a97634a4660e9c2ba7b07a1be052d:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit b67e64aab60a97634a4660e9c2ba7b07a1be052d
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Tue Oct 24 20:12:08 2017 +0000

    searchable-scrollback: add bindings for scrolling and pasting

diff --git a/src/perl/searchable-scrollback b/src/perl/searchable-scrollback

index 60f18522981a4d553bc246a2f729b9b3317c2859..

index ..7c944900870e44990ca784c4a7870fbea9d4029c 100644

--- a/src/perl/searchable-scrollback
+++ b/src/perl/searchable-scrollback
@@ -16,12 +16,49 @@ default). While in search mode, normal terminal input/output is
 suspended and a regex is displayed at the bottom of the screen.

 Inputting characters appends them to the regex and continues incremental
-search. C<BackSpace> removes a character from the regex, C<Up> and C<Down>
-search upwards/downwards in the scrollback buffer, C<End> jumps to the
-bottom. C<Escape> leaves search mode and returns to the point where search
-was started, while C<Enter> or C<Return> stay at the current position and
-additionally stores the first match in the current line into the primary
-selection if the C<Shift> modifier is active.
+search. In addition, the following bindings are recognized:
+
+=over 4
+
+=item C<BackSpace>
+
+Remove a character from the regex.
+
+=item C<Insert>
+
+Append the value of the PRIMARY selection to the regex.
+
+=item C<Up>
+
+Search for a match upwards.
+
+=item C<Down>
+
+Search for a match downwards.
+
+=item C<Prior>
+
+Scroll up.
+
+=item C<Next>
+
+Scroll down.
+
+=item C<End>
+
+Scroll to the bottom.
+
+=item C<Escape>
+
+Leave the mode and return to the point where search was started.
+
+=item C<Enter> or C<Return>
+
+Leave the mode maintaining the current position in the scrollback.
+Additionally, if the C<Shift> modifier is active, store the first
+match in the current line into the primary selection.
+
+=back

 The regex defaults to "(?i)", resulting in a case-insensitive search. To
 get a case-sensitive search you can delete this prefix using C<BackSpace>
@@ -184,6 +221,14 @@ sub key_press {
       my $line = $self->line ($self->{row});
       $self->search (+1, $line->end + 1)
          if $line->end < $self->nrow;
+   } elsif ($keysym == 0xff55) { # prior
+      my $row = $self->view_start - ($self->nrow - 1);
+      $self->view_start (List::Util::min 0, $row);
+   } elsif ($keysym == 0xff56) { # next
+      my $row = $self->view_start + ($self->nrow - 1);
+      $self->view_start (List::Util::min 0, $row);
+   } elsif ($keysym == 0xff63) { # insert
+      $self->selection_request (urxvt::CurrentTime, 1);
    } elsif ($keysym == 0xff08) { # backspace
       substr $self->{search}, -1, 1, "";
       $self->search (+1, $self->{row});

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 11:55:29 2024