*** empty log message ***
authorroot <root>
Mon, 9 Jan 2006 23:00:07 +0000 (23:00 +0000)
committerroot <root>
Mon, 9 Jan 2006 23:00:07 +0000 (23:00 +0000)
Changes
MANIFEST
autoconf/configure.in
doc/rxvt.1.pod
src/perl/searchable-scrollback
src/rxvt.h
src/rxvtperl.xs
src/screen.C
src/urxvt.pm

diff --git a/Changes b/Changes
index b71129d7fce168ffe9fee52b881bf167a2902fed..94c71410edbffa4b763fccb82ae4670372721ff3 100644 (file)
--- a/Changes
+++ b/Changes
@@ -11,10 +11,10 @@ WISH: support tex fonts
 
        - added sections for DISTRIBUTION MAINTAINERS and about
           SETUID/SETGID to the FAQ.
+        - selection, searchable-scrollback, selection-popup and
+          option-popup extensions enabled by default.
         - increased xft drawing speed for problematic fonts. The effect
           will likely be small as 99% of the xft slowness is server-related.
-       - selection, selection-popup and option-popup extensions
-          enabled by default.
         - perl: much increased functionality, better overlays, popup support
           and much much more.
         - perl: urxvt::line now can set via ->t and ->r.
@@ -26,6 +26,7 @@ WISH: support tex fonts
         - free the resource database: this plugs a massive memory leak. As a
           side effect, it also gets rid of XGetDefault calls.
         - free one of the cursors, fixes a small memory leak.
+        - built-in (as opposed to terminfos) visual bell was broken/too fast.
 
 6.3  Wed Jan  4 22:37:10 CET 2006
         - SECURITY FIX: on systems using openpty, permissions were
index 77101a23f3914d3efa5a8b506d262a7c3131b798..fddf319c76d807409e21c950b59753ab70897721 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -171,12 +171,13 @@ src/typemap
 src/rxvtperl.h
 src/rxvtperl.xs
 
+src/perl/urxvt-popup
+src/perl/selection
+src/perl/option-popup
+src/perl/selection-popup
+src/perl/searchable-scrollback
 src/perl/example-refresh-hooks
 src/perl/block-graphics-to-ascii
 src/perl/digital-clock
-src/perl/option-popup
-src/perl/selection-popup
-src/perl/urxvt-popup
-src/perl/selection
 src/perl/mark-urls
 
index 847d913469357afec410cd8c1a5e715a00642863..c845b523f41cf489a2f6d57e05604905c85c9a15 100644 (file)
@@ -1428,6 +1428,10 @@ AC_SUBST(PERL)
 AC_SUBST(IF_PERL)
 AC_SUBST(PERL_O)
 
+if text x$support_perl = xyes; then
+   support_frills=yes
+fi
+
 dnl> AC_CHECK_FUNCS(gettimeofday putenv select socket)
 
 CFLAGS=${CFLAGS--O}
index b3d1bb9fccecac9b493488492579fb5f347a4465..250d873676ddbb1d15f0265ce8a806cfbc231d62 100644 (file)
@@ -1090,11 +1090,17 @@ Comma-separated list(s) of perl extension scripts (default: C<default>) to
 use in this terminal instance; option B<-pe>.
 
 Extension names can be prefixed with a C<-> sign to prohibit using
-it. This can be useful to selectively disable some extensions loaded
+them. This can be useful to selectively disable some extensions loaded
 by default, or specified via the C<perl-ext-common> resource. For
 example, C<default,-selection> will use all the default extension except
 C<selection>.
 
+Extension names can also be followed by an argument in angle brackets
+(e.g.  C<< searchable-scrollback<M-s> >>, which binds the hotkey for
+searchable scorllback to Alt/Meta-s). Mentioning the same extension
+multiple times with different arguments will pass multiple arguments to
+the extension.
+
 Each extension is looked up in the library directories, loaded if
 necessary, and bound to the current terminal instance.
 
index 283c86caa0b219b7c507a0ed6625655a10dc9d9a..e84caf5694b00dda409f2af0d072afb026a895f9 100644 (file)
@@ -61,7 +61,7 @@ sub leave {
 sub idle {
    my ($self) = @_;
 
-   $self->msg ("scrollback search, escape=exit, enter=accept, /=start search, n=next, p=previous");
+   $self->msg ("scrollback search, escape=exit, enter=accept, /=start search, n=next, p=previous, G=bottom");
 
    delete $self->{in_search};
 }
@@ -94,7 +94,7 @@ sub search {
    }
 
    $self->msg ("enter/type/backspace: /$self->{search}_"
-               . ($self->{found} ? " (not found)" : ""));
+               . ($self->{found} ? "" : " (not found)"));
    $self->scr_bell unless $self->{found};
 }
 
@@ -141,9 +141,12 @@ sub key_press {
       } elsif ($string eq "/") {
          $self->{in_search} = $self->view_start;
          $self->search;
+      } elsif ($string eq "G") {
+         $self->view_start (0);
       } elsif ($string eq "n") {
          $self->search;
       } elsif ($string eq "p") {
+         # TODO
       } elsif ($string ne "") {
          $self->scr_bell;
       }
index 6afae97f80244ee7d7fd71734c229e64c41bdea6..a66c39edb1ba4b74dce57d25714af840f7ac4730 100644 (file)
@@ -1516,6 +1516,8 @@ struct rxvt_term : zero_initialized, rxvt_vars {
   int scr_changeview (unsigned int oldviewstart);
   void scr_bell ();
   void scr_printscreen (int fullhist);
+  void scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle1, rend_t rstyle2);
+  void scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle);
   void scr_reverse_selection ();
   void scr_dump (int fd);
   void selection_check (int check_more);
index 7de61ed75d84c984f6a975c839f4db9f690e0723..88e775f805edd559050f7e21fcb5d22d97e26992 100644 (file)
@@ -1338,6 +1338,12 @@ rxvt_term::selection (SV *newtext = 0)
           }
 }
 
+void
+rxvt_term::scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle1 = RS_RVid, U32 rstyle2 = RS_RVid | RS_Uline)
+
+void
+rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle = RS_RVid)
+
 void
 rxvt_term::scr_bell ()
 
index 6ac89a62eb70a69674c9f86a43ba4bd240c89f41..cd1105ce6b6c865881ed743a7503644cbdc1515b 100644 (file)
@@ -2459,6 +2459,54 @@ rxvt_term::scr_clear (bool really)
     XClearWindow (display->display, vt);
 }
 
+void
+rxvt_term::scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle1, rend_t rstyle2)
+{
+  int view_end = -view_start + nrow;
+  int row, col;
+
+  for (row = max (beg_row, -view_start); row <= min (end_row, view_end); row++)
+    {
+      text_t *stp = ROW(row).t;
+      rend_t *srp = ROW(row).r;
+
+      for (col = beg_col; col < end_col; col++)
+        srp[col] ^= rstyle1;
+
+      while (col-- > beg_col && (stp[col] == NOCHAR || unicode::is_space (stp[col])))
+        srp[col] ^= rstyle2;
+
+      if (++col < end_col)
+        srp[col] ^= rstyle2;
+    }
+}
+
+void
+rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle)
+{
+  int view_end = -view_start + nrow;
+  int row, col;
+
+  if (beg_row >= -view_start)
+    {
+      col = beg_col;
+      row = beg_row;
+    }
+  else
+    {
+      col = 0;
+      row = -view_start;
+    }
+
+  for (; row < min (end_row, view_end); row++, col = 0)
+    for (rend_t *srp = ROW(row).r; col < ncol; col++)
+      srp[col] ^= RS_RVid;
+
+  if (row == end_row)
+    for (rend_t *srp = ROW(row).r; col < end_col; col++)
+      srp[col] ^= RS_RVid;
+}
+
 /* ------------------------------------------------------------------------- */
 void
 rxvt_term::scr_reverse_selection ()
@@ -2467,49 +2515,16 @@ rxvt_term::scr_reverse_selection ()
       && current_screen == selection.screen
       && selection.end.row >= -view_start)
     {
-      int view_end = -view_start + nrow;
-      int row, col;
-
 #if ENABLE_FRILLS
       if (selection.rect)
-        {
-          for (row = max (selection.beg.row, -view_start); row <= min (selection.end.row, view_end); row++)
-            {
-              text_t *stp = ROW(row).t;
-              rend_t *srp = ROW(row).r;
-
-              for (col = selection.beg.col; col < selection.end.col; col++)
-                srp[col] ^= RS_RVid;
-
-              while (col-- > selection.beg.col && (stp[col] == NOCHAR || unicode::is_space (stp[col])))
-                srp[col] ^= RS_RVid | RS_Uline;
-
-              if (++col < selection.end.col)
-                srp[col] ^= RS_RVid | RS_Uline;
-            }
-        }
+        scr_xor_rect (selection.beg.row, selection.beg.col,
+                      selection.end.row, selection.end.col,
+                      RS_RVid, RS_RVid | RS_Uline);
       else
 #endif
-        {
-          if (selection.beg.row >= -view_start)
-            {
-              col = selection.beg.col;
-              row = selection.beg.row;
-            }
-          else
-            {
-              col = 0;
-              row = -view_start;
-            }
-
-          for (; row < min (selection.end.row, view_end); row++, col = 0)
-            for (rend_t *srp = ROW(row).r; col < ncol; col++)
-              srp[col] ^= RS_RVid;
-
-          if (row == selection.end.row)
-            for (rend_t *srp = ROW(row).r; col < selection.end.col; col++)
-              srp[col] ^= RS_RVid;
-        }
+        scr_xor_span (selection.beg.row, selection.beg.col,
+                      selection.end.row, selection.end.col,
+                      RS_RVid);
     }
 }
 
index c8db59d0fdab857f92914ee88ebc31ff1c623824..1aeb017a35d90c59a4b57b9ceb14226919a0e66d 100644 (file)
@@ -943,6 +943,19 @@ Convert the given text string into the corresponding locale encoding.
 
 Convert the given locale-encoded octets into a perl string.
 
+=item $term->scr_xor_span ($beg_row, $beg_col, $end_row, $end_col[, $rstyle])
+
+XORs the rendition values in the given span with the provided value
+(default: C<RS_RVid>). Useful in refresh hooks to provide effects similar
+to the selection.
+
+=item $term->scr_xor_rect ($beg_row, $beg_col, $end_row, $end_col[, $rstyle1[, $rstyle2]])
+
+Similar to C<scr_xor_span>, but xors a rectangle instead. Trailing
+whitespace will additionally be xored with the C<$rstyle2>, which defaults
+to C<RS_RVid | RS_Uline>, which removes reverse video again and underlines
+it instead.
+
 =item $term->scr_bell
 
 Ring the bell!