From: root Date: Wed, 4 Jan 2006 00:09:12 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=b6b8dde35beeff3aa46e9426c9f00678664631ef;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/doc/rxvt.7.html b/doc/rxvt.7.html index 6be04898..74308f3b 100644 --- a/doc/rxvt.7.html +++ b/doc/rxvt.7.html @@ -1879,6 +1879,7 @@ Set XTerm Parameters. 8-bit ST: 0x9c, 7-bit ST sequence: ESC \ (0x1b, Ps = 713Set bold-italic fontset to Pt. Similar to Ps = 50 (Compile styles). Ps = 720Move viewing window up by Pt lines, or clear scrollback buffer if Pt = 0 (Compile frills). Ps = 721Move viewing window down by Pt lines, or clear scrollback buffer if Pt = 0 (Compile frills). +Ps = 777Call the perl extension with the given string, which should be of the form extension:parameters (Compile perl).

diff --git a/doc/rxvt.7.man.in b/doc/rxvt.7.man.in index d366676a..43c86641 100644 --- a/doc/rxvt.7.man.in +++ b/doc/rxvt.7.man.in @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "rxvt 7" -.TH rxvt 7 "2006-01-02" "6.2" "RXVT-UNICODE" +.TH rxvt 7 "2006-01-04" "6.2" "RXVT-UNICODE" .SH "NAME" RXVT REFERENCE \- FAQ, command sequences and other background information .SH "SYNOPSIS" @@ -1757,6 +1757,7 @@ Ps = 712 Set italic fontset to Pt. Similar to Ps = 50 (Compile styles). Ps = 713 Set bold-italic fontset to Pt. Similar to Ps = 50 (Compile styles). Ps = 720 Move viewing window up by Pt lines, or clear scrollback buffer if Pt = 0 (Compile frills). Ps = 721 Move viewing window down by Pt lines, or clear scrollback buffer if Pt = 0 (Compile frills). +Ps = 777 Call the perl extension with the given string, which should be of the form extension:parameters (Compile perl). .TE .PP diff --git a/doc/rxvt.7.pod b/doc/rxvt.7.pod index 2f376626..90d71bbd 100644 --- a/doc/rxvt.7.pod +++ b/doc/rxvt.7.pod @@ -1617,6 +1617,7 @@ B can be escaped by prefixing it with SYN (0x16, ^V). B<< C >> Set bold-italic fontset to B<< C >>. Similar to C (Compile styles). B<< C >> Move viewing window up by B<< C >> lines, or clear scrollback buffer if C (Compile frills). B<< C >> Move viewing window down by B<< C >> lines, or clear scrollback buffer if C (Compile frills). + B<< C >> Call the perl extension with the given string, which should be of the form C (Compile perl). =end table diff --git a/doc/rxvt.7.txt b/doc/rxvt.7.txt index 19919bbc..b2300dfb 100644 --- a/doc/rxvt.7.txt +++ b/doc/rxvt.7.txt @@ -1286,6 +1286,7 @@ XTerm Operating System Commands Ps = 713 Set bold-italic fontset to Pt. Similar to Ps = 50 (Compile styles). Ps = 720 Move viewing window up by Pt lines, or clear scrollback buffer if Pt = 0 (Compile frills). Ps = 721 Move viewing window down by Pt lines, or clear scrollback buffer if Pt = 0 (Compile frills). + Ps = 777 Call the perl extension with the given string, which should be of the form extension:parameters (Compile perl). diff --git a/doc/rxvtperl.3.html b/doc/rxvtperl.3.html index f33e8221..d9998d91 100644 --- a/doc/rxvtperl.3.html +++ b/doc/rxvtperl.3.html @@ -239,6 +239,22 @@ number of lines that will be in the scrollback buffer.

Called whenever the program(s) running in the urxvt window send output.

+
on_osc_seq $term, $string
+
+
+Called whenever the ESC ] 777 ; string ST command sequence (OSC = +operating system command) is processed. Cursor position and other state +information is up-to-date when this happens. For interoperability, the +string should start with the extension name and a colon, to distinguish +it from commands for other extensions, and this might be enforced in the +future. +
+
+

Be careful not ever to trust (in a security sense) the data you receive, +as its source can not easily be controleld (e-mail content, messages from +other users on the same system etc.).

+
+

on_refresh_begin $term
diff --git a/doc/rxvtperl.3.man.in b/doc/rxvtperl.3.man.in index 21bb1bb4..4510220f 100644 --- a/doc/rxvtperl.3.man.in +++ b/doc/rxvtperl.3.man.in @@ -299,6 +299,19 @@ number of lines that will be in the scrollback buffer. .el .IP "on_tty_activity \f(CW$term\fR *NYI*" 4 .IX Item "on_tty_activity $term *NYI*" Called whenever the program(s) running in the urxvt window send output. +.ie n .IP "on_osc_seq $term\fR, \f(CW$string" 4 +.el .IP "on_osc_seq \f(CW$term\fR, \f(CW$string\fR" 4 +.IX Item "on_osc_seq $term, $string" +Called whenever the \fB\s-1ESC\s0 ] 777 ; string \s-1ST\s0\fR command sequence (\s-1OSC\s0 = +operating system command) is processed. Cursor position and other state +information is up-to-date when this happens. For interoperability, the +string should start with the extension name and a colon, to distinguish +it from commands for other extensions, and this might be enforced in the +future. +.Sp +Be careful not ever to trust (in a security sense) the data you receive, +as its source can not easily be controleld (e\-mail content, messages from +other users on the same system etc.). .ie n .IP "on_refresh_begin $term" 4 .el .IP "on_refresh_begin \f(CW$term\fR" 4 .IX Item "on_refresh_begin $term" diff --git a/doc/rxvtperl.3.txt b/doc/rxvtperl.3.txt index 39007fdb..5f81ead4 100644 --- a/doc/rxvtperl.3.txt +++ b/doc/rxvtperl.3.txt @@ -145,6 +145,18 @@ DESCRIPTION Called whenever the program(s) running in the urxvt window send output. + on_osc_seq $term, $string + Called whenever the ESC ] 777 ; string ST command sequence (OSC = + operating system command) is processed. Cursor position and other + state information is up-to-date when this happens. For + interoperability, the string should start with the extension name + and a colon, to distinguish it from commands for other extensions, + and this might be enforced in the future. + + Be careful not ever to trust (in a security sense) the data you + receive, as its source can not easily be controleld (e-mail content, + messages from other users on the same system etc.). + on_refresh_begin $term Called just before the screen gets redrawn. Can be used for overlay or similar effects by modify terminal contents in refresh_begin, and diff --git a/src/command.C b/src/command.C index fbb297cd..ec026f7b 100644 --- a/src/command.C +++ b/src/command.C @@ -3963,12 +3963,14 @@ rxvt_term::process_xterm_seq (int op, const char *str, unsigned char resp) case URxvt_view_up: case URxvt_view_down: - int lines = atoi (str); + { + int lines = atoi (str); - if (lines) - scr_page (op == URxvt_view_up ? UP : DN, lines); - else - scr_erase_savelines (); + if (lines) + scr_page (op == URxvt_view_up ? UP : DN, lines); + else + scr_erase_savelines (); + } break; #endif @@ -3978,9 +3980,7 @@ rxvt_term::process_xterm_seq (int op, const char *str, unsigned char resp) if (PERL_INVOKE ((this, HOOK_OSC_SEQ, DT_STRING, str, DT_END))) ; // no responses yet break; - #endif - } } /*----------------------------------------------------------------------*/ diff --git a/src/rxvt.h b/src/rxvt.h index 596066cf..3dca1c15 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -471,6 +471,8 @@ enum { URxvt_view_up = 720, URxvt_view_down = 721, + + URxvt_perl = 777, }; /* Words starting with `Color_' are colours. Others are counts */ diff --git a/src/rxvtperl.h b/src/rxvtperl.h index b52b18a9..99327e53 100644 --- a/src/rxvtperl.h +++ b/src/rxvtperl.h @@ -38,6 +38,7 @@ enum hook_type { HOOK_VIEW_CHANGE, HOOK_SCROLL_BACK, HOOK_TTY_ACTIVITY, + HOOK_OSC_SEQ, HOOK_REFRESH_BEGIN, HOOK_REFRESH_END, diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index 23ff21e9..8949d3b8 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -519,6 +519,7 @@ BOOT: set_hookname (VIEW_CHANGE); set_hookname (SCROLL_BACK); set_hookname (TTY_ACTIVITY); + set_hookname (OSC_SEQ); set_hookname (REFRESH_BEGIN); set_hookname (REFRESH_END); set_hookname (KEYBOARD_COMMAND); diff --git a/src/urxvt.pm b/src/urxvt.pm index faf8be57..7b6ea94f 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -176,11 +176,16 @@ Called whenever the program(s) running in the urxvt window send output. =item on_osc_seq $term, $string -Called whenever the B command sequence is -processed. Cursor position and other state information is up-to-date when -this happens. For interoperability, the string should start with the -extension name and a colon, to distinguish it from commands for other -extensions, and this might be enforced in the future. +Called whenever the B command sequence (OSC = +operating system command) is processed. Cursor position and other state +information is up-to-date when this happens. For interoperability, the +string should start with the extension name and a colon, to distinguish +it from commands for other extensions, and this might be enforced in the +future. + +Be careful not ever to trust (in a security sense) the data you receive, +as its source can not easily be controleld (e-mail content, messages from +other users on the same system etc.). =item on_refresh_begin $term