--- rxvt-unicode/src/urxvt.pm 2006/01/21 08:07:38 1.122 +++ rxvt-unicode/src/urxvt.pm 2006/01/24 19:14:36 1.126 @@ -69,6 +69,13 @@ URxvt.selection.pattern-0: \\|([^|]+)\\| +Another example: Programs I use often output "absolute path: " at the +beginning of a line when they process multiple files. The following +pattern matches the filename (note, there is a single space at the very +end): + + URxvt.selection.pattern-0: ^(/[^:]+):\ + You can look at the source of the selection extension to see more interesting uses, such as parsing a line from beginning to end. @@ -129,6 +136,31 @@ additionally stores the first match in the current line into the primary selection. +=item readline (enabled by default) + +A support package that tries to make editing with readline easier. At the +moment, it reacts to clicking with the left mouse button by trying to +move the text cursor to this position. It does so by generating as many +cursor-left or cursor-right keypresses as required (the this only works +for programs that correctly support wide characters). + +To avoid too many false positives, this is only done when: + +=over 4 + +=item - the tty is in ICANON state. + +=item - the text cursor is visible. + +=item - the primary screen is currently being displayed. + +=item - the mouse is on the same (multi-row-) line as the text cursor. + +=back + +The normal selection mechanism isn't disabled, so quick successive clicks +might interfere with selection creation in harmless ways. + =item selection-autotransform This selection allows you to do automatic transforms on a selection @@ -164,29 +196,6 @@ every error message as a selection pattern, and the second line transforms the message into vi commands to load the file. -=item readline - -A support package that tries to make editing with readline easier. At the -moment, it reacts to clicking with the left mouse button by trying to -move the text cursor to this position. It does so by generating as many -cursor-left or cursor-right keypresses as required (the this only works -for programs that correctly support wide characters). - -To avoid too many false positives, this is only done when: - -=over 4 - -=item - the mouse is on the same (multi-row-) line as the text cursor. - -=item - the primary screen is currently being displayed. - -=item - the text cursor is visible. - -=back - -The normal selection mechanism isn't disabled, so quick successive clicks -might interfere with selection creation in harmless ways. - =item tabbed This transforms the terminal into a tabbar with additional terminals, that @@ -563,7 +572,7 @@ our $RESCLASS; our $RXVTNAME; -our $NOCHAR = chr 0xfffe; +our $NOCHAR = chr 0xffff; =head2 Variables in the C Package @@ -720,6 +729,8 @@ }; } +no warnings 'utf8'; + my $verbosity = $ENV{URXVT_PERL_VERBOSITY}; sub verbose { @@ -745,7 +756,7 @@ or die "$path: $!"; my $source = - "package $pkg; use strict; use utf8;\n" + "package $pkg; use strict; use utf8; no warnings 'utf8';\n" . "#line 1 \"$path\"\n{\n" . (do { local $/; <$fh> }) . "\n};\n1"; @@ -780,7 +791,7 @@ for (grep $_, map { split /,/, $TERM->resource ("perl_ext_$_") } 1, 2) { if ($_ eq "default") { - $ext_arg{$_} ||= [] for qw(selection option-popup selection-popup searchable-scrollback); + $ext_arg{$_} ||= [] for qw(selection option-popup selection-popup searchable-scrollback readline); } elsif (/^-(.*)$/) { delete $ext_arg{$1}; } elsif (/^([^<]+)<(.*)>$/) { @@ -1310,6 +1321,11 @@ description of C<< urxvt::timer->events >>. Make sure to always restore the previous value. +=item $fd = $term->pty_fd + +Returns the master file descriptor for the pty in use, or C<-1> if no pty +is used. + =item $windowid = $term->parent Return the window id of the toplevel window. @@ -1418,8 +1434,8 @@ to replace only parts of a line. The font index in the rendition will automatically be updated. -C<$text> is in a special encoding: tabs and wide characters that use -more than one cell when displayed are padded with C<$urxvt::NOCHAR> +C<$text> is in a special encoding: tabs and wide characters that use more +than one cell when displayed are padded with C<$urxvt::NOCHAR> (chr 65535) characters. Characters with combining characters and other characters that do not fit into the normal tetx encoding will be replaced with characters in the private use area.