rxvt-unicode changelog <= google-friendly title
-TODO: -pe tabbed users want -e and probably lots of other things.
TODO: xcopyarea pass broken, fix and improve
TODO: event mechanism that replaces on_keyboard_command with something more scalable.
TODO: overlays collide with the way the out-of-focus cursor is being drawn
of more network bandwidth and slight nausea on the side of the author.
- readline perl extension now requires shift-click instead of a normal
click.
+ - tabbed perl extension now supports -e.
- disabled graphics-exposures on the main drawing GC, report any
refresh bugs please.
- improve property handling for -pe tabbed: avoid unnecessary property
(reported by Paco-Paco).
- fix a bug in xcopyarea pass and _disable_ it, as it seems not to be
working in either rxvt-unicode nor in the original rxvt.
+ - removed undocumented -exec alias for the -e option.
7.6 Fri Feb 10 08:52:36 CET 2006
- changed interpretation of [alpha] colour prefix.
const char **cmd_argv, **r_argv;
/*
- * Look for -exec option. Find => split and make cmd_argv[] of command args
+ * Look for -e option. Find => split and make cmd_argv[] of command args
*/
for (r_argc = 0; r_argc < argc; r_argc++)
- if (!strcmp (argv[r_argc], "-e") || !strcmp (argv[r_argc], "-exec"))
+ if (!strcmp (argv[r_argc], "-e"))
break;
r_argv = (const char **)rxvt_malloc (sizeof (char *) * (r_argc + 1));
my $cur = $line->offset_of ($row, $col);
my $ofs = $line->offset_of ($event->{row}, $event->{col});
- if ($ofs >= 0 && $ofs < $line->l) {
- my $diff = $ofs - $cur;
- my $move;
-
- if ($diff < 0) {
- ($ofs, $cur) = ($cur, $ofs);
- $move = "\x1b[D";
- } else {
- $move = "\x1b[C";
- }
+ $ofs >= 0 && $ofs < $line->l
+ or return;
- my $skipped = substr $line->t, $cur, $ofs - $cur;
- $skipped =~ s/\x{ffff}//g;
+ my $diff = $ofs - $cur;
+ my $move;
- $self->tt_write ($move x length $skipped);
+ if ($diff < 0) {
+ ($ofs, $cur) = ($cur, $ofs);
+ $move = "\x1b[D";
+ } else {
+ $move = "\x1b[C";
}
- ()
+ my $skipped = substr $line->t, $cur, $ofs - $cur;
+ $skipped =~ s/\x{ffff}//g;
+
+ $self->tt_write ($move x length $skipped);
+
+ 1
}
}
sub new_tab {
- my ($self) = @_;
+ my ($self, @argv) = @_;
my $offset = $self->fheight;
my $term = new urxvt::term
$self->env, $urxvt::RXVTNAME,
-embed => $self->parent,
+ @argv,
;
}
$self->cmd_parse ("\033[?25l");
- $self->new_tab;
+ my @argv = $self->argv;
+
+ do {
+ shift @argv;
+ } while @argv && $argv[0] ne "-e";
+
+ $self->new_tab (@argv);
()
}
{
rxvt_init ();
+ rxvt_term *t = new rxvt_term;
+
#if ENABLE_PERL
+ stringvec *args = new stringvec;
stringvec *envv = new stringvec;
+ for (int i = 0; i < argc; i++)
+ args->push_back (strdup (argv [i]));
+
for (char **var = environ; *var; var++)
envv->push_back (strdup (*var));
envv->push_back (0);
+
+ if (!t->init (args, envv))
#else
- stringvec *envv = 0;
+ if (!t->init (argc, argv, 0))
#endif
-
- rxvt_term *t = new rxvt_term;
-
- if (!t->init (argc, argv, envv))
return EXIT_FAILURE;
io_manager::loop ();
RETVAL
SV *
-rxvt_term::_env ()
- CODE:
+rxvt_term::envv ()
+ ALIAS:
+ argv = 1
+ PPCODE:
{
- if (THIS->envv)
- {
- AV *av = newAV ();
+ stringvec *vec = ix ? THIS->argv : THIS->envv;
- for (char **i = THIS->envv->begin (); i != THIS->envv->end (); ++i)
- if (*i)
- av_push (av, newSVpv (*i, 0));
+ EXTEND (SP, vec->size ());
- RETVAL = newRV_noinc ((SV *)av);
- }
- else
- RETVAL = &PL_sv_undef;
+ for (char **i = vec->begin (); i != vec->end (); ++i)
+ if (*i)
+ PUSHs (sv_2mortal (newSVpv (*i, 0)));
}
- OUTPUT:
- RETVAL
int
rxvt_term::pty_ev_events (int events = EVENT_UNDEF)
Returns a copy of the environment in effect for the terminal as a hashref
similar to C<\%ENV>.
+=item @envv = $term->envv
+
+Returns the environment as array of strings of the form C<VAR=VALUE>.
+
+=item @argv = $term->argv
+
+Return the argument vector as this terminal, similar to @ARGV, but
+includes the program name as first element.
+
=cut
sub env {
- if (my $env = $_[0]->_env) {
- +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), @$env }
- } else {
- +{ %ENV }
- }
+ +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), $_[0]->envv }
}
=item $modifiermask = $term->ModLevel3Mask