From 27e1a4796d993c96a067c5c38fb5f7ac52407be4 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 4 Mar 2006 20:14:35 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 2 ++ src/command.C | 6 +++++- src/hookinc.h | 1 + src/urxvt.pm | 12 +++++++++++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 9b3cac78..d9c9b61a 100644 --- a/Changes +++ b/Changes @@ -18,6 +18,8 @@ WISH: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the DUMB: support tex fonts - add FORCE_UNBUFFERED_XFT define to features.h. + - moved on_osc_seq to on_osc_seq_perl and added a more + generic osc_seq. 7.7 Tue Feb 21 12:32:49 CET 2006 - use double-buffered drawing (xft fonts only). On many driver/hardware diff --git a/src/command.C b/src/command.C index 226579bb..14f6bbf2 100644 --- a/src/command.C +++ b/src/command.C @@ -3758,6 +3758,10 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp) dLocal (Display *, dpy); assert (str != NULL); + + if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_INT, op, DT_STR, str, DT_END))) + ; // no responses yet + switch (op) { case XTerm_name: @@ -3984,7 +3988,7 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp) #if ENABLE_PERL case URxvt_perl: - if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_STR, str, DT_END))) + if (HOOK_INVOKE ((this, HOOK_OSC_SEQ_PERL, DT_STR, str, DT_END))) ; // no responses yet break; #endif diff --git a/src/hookinc.h b/src/hookinc.h index ae8815a4..603ebe77 100644 --- a/src/hookinc.h +++ b/src/hookinc.h @@ -19,6 +19,7 @@ def (LINE_UPDATE) def (ADD_LINES) def (OSC_SEQ) + def (OSC_SEQ_PERL) def (TT_WRITE) def (REFRESH_BEGIN) diff --git a/src/urxvt.pm b/src/urxvt.pm index 65d95cc4..4b6ceff2 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -495,7 +495,17 @@ It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, $nrow - 1) represent the lines to be scrolled out). C<$saved> is the total number of lines that will be in the scrollback buffer. -=item on_osc_seq $term, $string +=item on_osc_seq $term, $op, $args + +Called on every OSC sequence and can be used to suppress it or modify its +behaviour. The default should be to return an empty list. A true value +suppresses execution of the request completely. Make sure you don't get +confused by recursive invocations when you output an osc sequence within +this callback. + +C should be used for new behaviour. + +=item on_osc_seq_perl $term, $string Called whenever the B command sequence (OSC = operating system command) is processed. Cursor position and other state -- 2.34.1