repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: fb5931fda0f9abb992f7e5c0e1d1b4c71cc88d77: path_to: revision_to:
commit fb5931fda0f9abb992f7e5c0e1d1b4c71cc88d77 Author: Marc LehmannDate: Thu Jan 12 02:20:56 2006 +0000 *** empty log message *** diff --git a/Changes b/Changes
--- a/Changes
+++ b/Changes
@@ -7,16 +7,15 @@ TODO: "slow" rendering mode for bidi and scripts
TODO: read property sequence is broken with respect to utf-8 etc.
TODO: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the correct nextstep look.
TODO: clarify and get rid of SMOOTH_REFRESH etc.
+TODO: scroll lines into scrollback when tscroll==0, regardless of bscrol
WISH: OnTheSpot editing, or maybe switch to miiiiiiif. or maybe use perl and an overlay...
WISH: just for fun, do shade and tint with XRender.
WISH: support tex fonts
7.0
-TODO: run external commands more sytematically (using $self->env etc.)
TODO: document searchable-scorllback hotkey
TODO: double-click and right-extend
TODO: change scrollback to use cursor movements
-TODO: middle-click conflicts with menu use, !Ctrl
- added sections for DISTRIBUTION MAINTAINERS and about
SETUID/SETGID to the FAQ.
- selection, searchable-scrollback, selection-popup and
diff --git a/src/perl/mark-urls b/src/perl/mark-urls
--- a/src/perl/mark-urls
+++ b/src/perl/mark-urls
@@ -11,6 +11,8 @@ sub on_start {
my ($self) = @_;
$self->{browser} = urxvt::untaint $self->x_resource ("urlLauncher") || "x-www-browser";
+
+ ()
}
sub on_line_update {
@@ -42,11 +44,14 @@ sub on_button_release {
my $line = $self->line ($row);
my $text = $line->t;
+
+ my $mask = $self->ModLevel3Mask | $self->ModMetaMask
+ | urxvt::ShiftMask | urxvt::ControlMask;
- if ($event->{button} == 2) {
+ if ($event->{button} == 2 && ($event->{state} & $mask) == 0) {
while ($text =~ /$url/g) {
- if ($-[0] <= $col && $+[0] >= $col) {
- system "$self->{browser} \Q$1\E &";
+ if ($-[1] <= $col && $+[1] >= $col) {
+ urxvt::exec_async $self->{browser}, $1;
return 1;
}
}
diff --git a/src/perl/selection-popup b/src/perl/selection-popup
--- a/src/perl/selection-popup
+++ b/src/perl/selection-popup
@@ -17,6 +17,8 @@ sub on_start {
$self->{browser} = urxvt::untaint $self->x_resource ("urlLauncher") || "x-www-browser";
$self->grab_button (3, urxvt::ControlMask);
+
+ ()
}
sub on_button_press {
@@ -69,7 +71,7 @@ sub on_button_press {
and $add_button->("shell quote" => sub { $_ = "\Q$_" });
/^(http|ftp|telnet|irc|news):\//
- and $add_button->("run $self->{browser}" => sub { system "$self->{browser} \Q$_\E &" });
+ and $add_button->("run $self->{browser}" => sub { urxvt::exec_async $self->{browser}, $_ });
}
$popup->show;
diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs
--- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -31,6 +31,8 @@ #include#include +#include "unistd.h" + #include "iom.h" #include "rxvt.h" #include "keyboard.h" @@ -712,6 +714,9 @@ untaint (SV *sv) OUTPUT: RETVAL +void +_exit (int status) + bool safe () CODE: diff --git a/src/urxvt.pm b/src/urxvt.pm
--- a/src/urxvt.pm
+++ b/src/urxvt.pm
@@ -617,6 +617,18 @@ sub invoke {
$retval
}
+sub exec_async(@) {
+ my $pid = fork;
+
+ return
+ if !defined $pid or $pid;
+
+ %ENV = %{ $TERM->env };
+
+ exec @_;
+ _exit 255;
+}
+
# urxvt::term::extension
package urxvt::term::extension;
-----END OF PAGE-----