--- rxvt-unicode/src/perl/searchable-scrollback 2014/12/26 19:19:30 1.43 +++ rxvt-unicode/src/perl/searchable-scrollback 2017/10/24 20:12:08 1.44 @@ -16,12 +16,49 @@ suspended and a regex is displayed at the bottom of the screen. Inputting characters appends them to the regex and continues incremental -search. C removes a character from the regex, C and C -search upwards/downwards in the scrollback buffer, C jumps to the -bottom. C leaves search mode and returns to the point where search -was started, while C or C stay at the current position and -additionally stores the first match in the current line into the primary -selection if the C modifier is active. +search. In addition, the following bindings are recognized: + +=over 4 + +=item C + +Remove a character from the regex. + +=item C + +Append the value of the PRIMARY selection to the regex. + +=item C + +Search for a match upwards. + +=item C + +Search for a match downwards. + +=item C + +Scroll up. + +=item C + +Scroll down. + +=item C + +Scroll to the bottom. + +=item C + +Leave the mode and return to the point where search was started. + +=item C or C + +Leave the mode maintaining the current position in the scrollback. +Additionally, if the C 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 @@ -184,6 +221,14 @@ 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});