*** empty log message ***
authorroot <root>
Thu, 12 Jan 2006 02:20:56 +0000 (02:20 +0000)
committerroot <root>
Thu, 12 Jan 2006 02:20:56 +0000 (02:20 +0000)
Changes
src/perl/mark-urls
src/perl/selection-popup
src/rxvtperl.xs
src/urxvt.pm

diff --git a/Changes b/Changes
index d839c8905d83fa4150c814b77bafd4f68b2f7990..71e979ab0956f8083b4f71c2452b85d49cdf2dd8 100644 (file)
--- 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
index 5fa83972c5617fbb9319f36098db686aacaca490..68fea189d891759ea3914955cf477f89234f4367 100644 (file)
@@ -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;
            }
        }
index 5bc679f5d2e6c7f34cb021d59add7c8b029d13ce..11677b4883fd8281e3372371a1e9a514ab32a485 100644 (file)
@@ -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;
index 0e78f772cbccd7b143c75ad631a49dae50944748..675944007eedbf6c19fec5a7931a2a80e1ee57be 100644 (file)
@@ -31,6 +31,8 @@
 #include <cstddef>
 #include <cstdarg>
 
+#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:
index 9ba9369e3d08470d273fd997eecdc5b1da0537da..8b994530bf135d0ff66742f3d5a1fc1055b16765 100644 (file)
@@ -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;