-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: ff4fdfd348e8d1c13d175bec0b965ec47549806a: path_to: revision_to:
commit ff4fdfd348e8d1c13d175bec0b965ec47549806a Author: Marc Lehmann <schmorp@schmorp.de> Date: Mon Feb 21 19:26:07 2005 +0000 *** empty log message *** diff --git a/Changes b/Changes
--- a/Changes +++ b/Changes @@ -15,6 +15,8 @@ WISH: just for fun, do shade and tint with XRender. - use XmbSetWMProperties instead of XSetWMProperties. - properly update WM_LOCALE. - implement _NET_WM_PING protocol. + - implemented escape sequences to move the scrollback buffer view + and clear the scrollback buffer. 5.2 Sun Feb 20 01:48:59 CET 2005 - new option -pty-fd that makes the terminal a slave diff --git a/README.configure b/README.configure
--- a/README.configure +++ b/README.configure @@ -185,7 +185,7 @@ CONFIGURE OPTIONS settable extra linespacing iso-14755-2 and -3, and visual feedback backindex and forwardindex escape sequence - window op and locale change escape sequences + window op and some xterm/OSC escape sequences tripleclickwords settable insecure mode keysym remapping support diff --git a/doc/rxvt.7.html b/doc/rxvt.7.html
--- a/doc/rxvt.7.html +++ b/doc/rxvt.7.html @@ -1712,19 +1712,21 @@ Set XTerm Parameters. 8-bit ST: 0x9c, 7-bit ST sequence: ESC \ (0x1b, <tr><td>Ps = 18</td><td>Change colour of bold characters to Pt</td></tr> <tr><td>Ps = 19</td><td>Change colour of underlined characters to Pt</td></tr> <tr><td>Ps = 20</td><td>Change default background to Pt</td></tr> -<tr><td>Ps = 39</td><td>Change default foreground colour to Pt rxvt compile-time option</td></tr> +<tr><td>Ps = 39</td><td>Change default foreground colour to Pt.</td></tr> <tr><td>Ps = 46</td><td>Change Log File to Pt unimplemented</td></tr> -<tr><td>Ps = 49</td><td>Change default background colour to Pt rxvt compile-time option</td></tr> +<tr><td>Ps = 49</td><td>Change default background colour to Pt.</td></tr> <tr><td>Ps = 50</td><td>Set fontset to Pt, with the following special values of Pt (rxvt) #+n change up n #-n change down n if n is missing of 0, a value of 1 is used empty change to font0 n change to font n</td></tr> <tr><td>Ps = 55</td><td>Log all scrollback buffer and all of screen to Pt</td></tr> -<tr><td>Ps = 701</td><td>Change current locale to Pt, or, if Pt is ?, return the current locale (rxvt extension)</td></tr> -<tr><td>Ps = 703</td><td>Menubar command Pt rxvt compile-time option (rxvt-unicode extension)</td></tr> +<tr><td>Ps = 701</td><td>Change current locale to Pt, or, if Pt is ?, return the current locale (Compile frills).</td></tr> +<tr><td>Ps = 703</td><td>Menubar command Pt (Compile menubar).</td></tr> <tr><td>Ps = 704</td><td>Change colour of italic characters to Pt</td></tr> -<tr><td>Ps = 705</td><td>Change background pixmap tint colour to Pt</td></tr> +<tr><td>Ps = 705</td><td>Change background pixmap tint colour to Pt (Compile transparency).</td></tr> <tr><td>Ps = 710</td><td>Set normal fontset to Pt. Same as Ps = 50.</td></tr> -<tr><td>Ps = 711</td><td>Set bold fontset to Pt. Similar to Ps = 50.</td></tr> -<tr><td>Ps = 712</td><td>Set italic fontset to Pt. Similar to Ps = 50.</td></tr> -<tr><td>Ps = 713</td><td>Set bold-italic fontset to Pt. Similar to Ps = 50.</td></tr> +<tr><td>Ps = 711</td><td>Set bold fontset to Pt. Similar to Ps = 50 (Compile styles).</td></tr> +<tr><td>Ps = 712</td><td>Set italic fontset to Pt. Similar to Ps = 50 (Compile styles).</td></tr> +<tr><td>Ps = 713</td><td>Set bold-italic fontset to Pt. Similar to Ps = 50 (Compile styles).</td></tr> +<tr><td>Ps = 720</td><td>Move viewing window up by Pt lines, or clear scrollback buffer if Pt = 0 (Compile frills).</td></tr> +<tr><td>Ps = 721</td><td>Move viewing window down by Pt lines, or clear scrollback buffer if Pt = 0 (Compile frills).</td></tr> </table><p></p></dl> <p></p> <p> @@ -2779,7 +2781,7 @@ in combination with other switches) is:</p> settable extra linespacing iso-14755-2 and -3, and visual feedback backindex and forwardindex escape sequence - window op and locale change escape sequences + window op and some xterm/OSC escape sequences tripleclickwords settable insecure mode keysym remapping support diff --git a/doc/rxvt.7.man.in b/doc/rxvt.7.man.in
--- a/doc/rxvt.7.man.in +++ b/doc/rxvt.7.man.in @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "rxvt 7" -.TH rxvt 7 "2005-02-20" "5.2" "RXVT-UNICODE" +.TH rxvt 7 "2005-02-21" "5.2" "RXVT-UNICODE" .SH "NAME" RXVT REFERENCE \- FAQ, command sequences and other background information .SH "SYNOPSIS" @@ -1615,19 +1615,21 @@ Ps = 17 Change colour of highlight characters to Pt Ps = 18 Change colour of bold characters to Pt Ps = 19 Change colour of underlined characters to Pt Ps = 20 Change default background to Pt -Ps = 39 Change default foreground colour to Pt rxvt compile-time option +Ps = 39 Change default foreground colour to Pt. Ps = 46 Change Log File to Pt unimplemented -Ps = 49 Change default background colour to Pt rxvt compile-time option +Ps = 49 Change default background colour to Pt. Ps = 50 Set fontset to Pt, with the following special values of Pt (rxvt) #+n change up n #-n change down n if n is missing of 0, a value of 1 is used empty change to font0 n change to font n Ps = 55 Log all scrollback buffer and all of screen to Pt -Ps = 701 Change current locale to Pt, or, if Pt is ?, return the current locale (@@RXVT_NAME@@ extension) -Ps = 703 Menubar command Pt rxvt compile-time option (rxvt-unicode extension) +Ps = 701 Change current locale to Pt, or, if Pt is ?, return the current locale (Compile frills). +Ps = 703 Menubar command Pt (Compile menubar). Ps = 704 Change colour of italic characters to Pt -Ps = 705 Change background pixmap tint colour to Pt +Ps = 705 Change background pixmap tint colour to Pt (Compile transparency). Ps = 710 Set normal fontset to Pt. Same as Ps = 50. -Ps = 711 Set bold fontset to Pt. Similar to Ps = 50. -Ps = 712 Set italic fontset to Pt. Similar to Ps = 50. -Ps = 713 Set bold-italic fontset to Pt. Similar to Ps = 50. +Ps = 711 Set bold fontset to Pt. Similar to Ps = 50 (Compile styles). +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). .TE .PP @@ -2352,7 +2354,7 @@ in combination with other switches) is: \& settable extra linespacing \& iso-14755-2 and -3, and visual feedback \& backindex and forwardindex escape sequence -\& window op and locale change escape sequences +\& window op and some xterm/OSC escape sequences \& tripleclickwords \& settable insecure mode \& keysym remapping support diff --git a/doc/rxvt.7.pod b/doc/rxvt.7.pod
--- a/doc/rxvt.7.pod +++ b/doc/rxvt.7.pod @@ -1477,19 +1477,21 @@ B<octet> can be escaped by prefixing it with SYN (0x16, ^V). B<< C<Ps = 18> >> Change colour of bold characters to B<< C<Pt> >> B<< C<Ps = 19> >> Change colour of underlined characters to B<< C<Pt> >> B<< C<Ps = 20> >> Change default background to B<< C<Pt> >> - B<< C<Ps = 39> >> Change default foreground colour to B<< C<Pt> >> I<rxvt compile-time option> + B<< C<Ps = 39> >> Change default foreground colour to B<< C<Pt> >>. B<< C<Ps = 46> >> Change Log File to B<< C<Pt> >> I<unimplemented> - B<< C<Ps = 49> >> Change default background colour to B<< C<Pt> >> I<rxvt compile-time option> + B<< C<Ps = 49> >> Change default background colour to B<< C<Pt> >>. B<< C<Ps = 50> >> Set fontset to B<< C<Pt> >>, with the following special values of B<< C<Pt> >> (B<rxvt>) B<< C<#+n> >> change up B<< C<n> >> B<< C<#-n> >> change down B<< C<n> >> if B<< C<n> >> is missing of 0, a value of 1 is used I<empty> change to font0 B<< C<n> >> change to font B<< C<n> >> B<< C<Ps = 55> >> Log all scrollback buffer and all of screen to B<< C<Pt> >> - B<< C<Ps = 701> >> Change current locale to B<< C<Pt> >>, or, if B<< C<Pt> >> is B<< C<?> >>, return the current locale (@@RXVT_NAME@@ extension) - B<< C<Ps = 703> >> Menubar command B<< C<Pt> >> I<rxvt compile-time option> (rxvt-unicode extension) + B<< C<Ps = 701> >> Change current locale to B<< C<Pt> >>, or, if B<< C<Pt> >> is B<< C<?> >>, return the current locale (Compile frills). + B<< C<Ps = 703> >> Menubar command B<< C<Pt> >> (Compile menubar). B<< C<Ps = 704> >> Change colour of italic characters to B<< C<Pt> >> - B<< C<Ps = 705> >> Change background pixmap tint colour to B<< C<Pt> >> + B<< C<Ps = 705> >> Change background pixmap tint colour to B<< C<Pt> >> (Compile transparency). B<< C<Ps = 710> >> Set normal fontset to B<< C<Pt> >>. Same as C<Ps = 50>. - B<< C<Ps = 711> >> Set bold fontset to B<< C<Pt> >>. Similar to C<Ps = 50>. - B<< C<Ps = 712> >> Set italic fontset to B<< C<Pt> >>. Similar to C<Ps = 50>. - B<< C<Ps = 713> >> Set bold-italic fontset to B<< C<Pt> >>. Similar to C<Ps = 50>. + B<< C<Ps = 711> >> Set bold fontset to B<< C<Pt> >>. Similar to C<Ps = 50> (Compile styles). + B<< C<Ps = 712> >> Set italic fontset to B<< C<Pt> >>. Similar to C<Ps = 50> (Compile styles). + B<< C<Ps = 713> >> Set bold-italic fontset to B<< C<Pt> >>. Similar to C<Ps = 50> (Compile styles). + B<< C<Ps = 720> >> Move viewing window up by B<< C<Pt> >> lines, or clear scrollback buffer if C<Pt = 0> (Compile frills). + B<< C<Ps = 721> >> Move viewing window down by B<< C<Pt> >> lines, or clear scrollback buffer if C<Pt = 0> (Compile frills). =end table @@ -2376,7 +2378,7 @@ in combination with other switches) is: settable extra linespacing iso-14755-2 and -3, and visual feedback backindex and forwardindex escape sequence - window op and locale change escape sequences + window op and some xterm/OSC escape sequences tripleclickwords settable insecure mode keysym remapping support diff --git a/doc/rxvt.7.txt b/doc/rxvt.7.txt
--- a/doc/rxvt.7.txt +++ b/doc/rxvt.7.txt @@ -1158,19 +1158,21 @@ XTerm Operating System Commands Ps = 18 Change colour of bold characters to Pt Ps = 19 Change colour of underlined characters to Pt Ps = 20 Change default background to Pt - Ps = 39 Change default foreground colour to Pt rxvt compile-time option + Ps = 39 Change default foreground colour to Pt. Ps = 46 Change Log File to Pt unimplemented - Ps = 49 Change default background colour to Pt rxvt compile-time option + Ps = 49 Change default background colour to Pt. Ps = 50 Set fontset to Pt, with the following special values of Pt (rxvt) #+n change up n #-n change down n if n is missing of 0, a value of 1 is used empty change to font0 n change to font n Ps = 55 Log all scrollback buffer and all of screen to Pt - Ps = 701 Change current locale to Pt, or, if Pt is ?, return the current locale (rxvt extension) - Ps = 703 Menubar command Pt rxvt compile-time option (rxvt-unicode extension) + Ps = 701 Change current locale to Pt, or, if Pt is ?, return the current locale (Compile frills). + Ps = 703 Menubar command Pt (Compile menubar). Ps = 704 Change colour of italic characters to Pt - Ps = 705 Change background pixmap tint colour to Pt + Ps = 705 Change background pixmap tint colour to Pt (Compile transparency). Ps = 710 Set normal fontset to Pt. Same as Ps = 50. - Ps = 711 Set bold fontset to Pt. Similar to Ps = 50. - Ps = 712 Set italic fontset to Pt. Similar to Ps = 50. - Ps = 713 Set bold-italic fontset to Pt. Similar to Ps = 50. + Ps = 711 Set bold fontset to Pt. Similar to Ps = 50 (Compile styles). + 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). @@ -1830,7 +1832,7 @@ CONFIGURE OPTIONS settable extra linespacing iso-14755-2 and -3, and visual feedback backindex and forwardindex escape sequence - window op and locale change escape sequences + window op and some xterm/OSC escape sequences tripleclickwords settable insecure mode keysym remapping support diff --git a/src/command.C b/src/command.C
--- a/src/command.C +++ b/src/command.C @@ -3668,28 +3668,6 @@ rxvt_term::process_color_seq (int report, int color, const char *str, unsigned c /* * XTerm escape sequences: ESC ] Ps;Pt (ST|BEL) - * 0 = change iconName/title - * 1 = change iconName - * 2 = change title - * 4 = change color - * 10 = change fg color - * 11 = change bg color - * 12 = change text color - * 13 = change mouse foreground color - * 17 = change highlight character colour - * 18 = change bold character color - * 19 = change underlined character color - * 46 = change logfile (not implemented) - * 50 = change font - * - * rxvt extensions: - * 20 = bg pixmap - * 39 = change default fg color - * 49 = change default bg color - * 55 = dump scrollback buffer and all of screen - * 701 = change locale - * 702 = find font - * 703 = menu */ void rxvt_term::process_xterm_seq (int op, const char *str, unsigned char resp) @@ -3798,19 +3776,19 @@ rxvt_term::process_xterm_seq (int op, const char *str, unsigned char resp) case XTerm_Color_BD: process_color_seq (XTerm_Color_BD, Color_BD, str, resp); break; - case XTerm_Color_IT: - process_color_seq (XTerm_Color_IT, Color_IT, str, resp); - break; case XTerm_Color_UL: process_color_seq (XTerm_Color_UL, Color_UL, str, resp); break; case XTerm_Color_RV: process_color_seq (XTerm_Color_RV, Color_RV, str, resp); break; + case URxvt_Color_IT: + process_color_seq (URxvt_Color_IT, Color_IT, str, resp); + break; #endif #if TRANSPARENT && TINTING - case XTerm_Color_tint: - process_color_seq (XTerm_Color_tint, Color_tint, str, resp); + case URxvt_Color_tint: + process_color_seq (URxvt_Color_tint, Color_tint, str, resp); check_our_parents (); if (am_transparent) want_full_refresh = want_refresh = 1; @@ -3854,6 +3832,24 @@ rxvt_term::process_xterm_seq (int op, const char *str, unsigned char resp) // TODO, when secure mode? break; +#ifdef MENUBAR + case URxvt_Menu: + if (options & Opt_insecure) + menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked + break; +#endif +#if 0 + case XTerm_dumpscreen: /* no error notices */ + { + int fd; + if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0) + { + scr_dump (fd); + close (fd); + } + } + break; +#endif case XTerm_font: op = URxvt_font; case URxvt_font: @@ -3878,9 +3874,9 @@ rxvt_term::process_xterm_seq (int op, const char *str, unsigned char resp) break; #if ENABLE_FRILLS - case XTerm_locale: + case URxvt_locale: if (query) - tt_printf ("\33]%d;%-.250s%c", XTerm_locale, (options & Opt_insecure) ? locale : "", resp); + tt_printf ("\33]%d;%-.250s%c", URxvt_locale, (options & Opt_insecure) ? locale : "", resp); else { set_locale (str); @@ -3888,24 +3884,18 @@ rxvt_term::process_xterm_seq (int op, const char *str, unsigned char resp) init_xlocale (); } break; -#endif -#ifdef MENUBAR - case XTerm_Menu: - if (options & Opt_insecure) - menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked - break; -#endif -#if 0 - case XTerm_dumpscreen: /* no error notices */ - { - int fd; - if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0) - { - scr_dump (fd); - close (fd); - } - } + case URxvt_view_up: + case URxvt_view_down: + int lines = atoi (str); + + if (lines) + scr_page (op == URxvt_view_up ? UP : DN, lines); + else + { + scr_erase_savelines (); + } + break; #endif } diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h +++ b/src/rxvt.h @@ -26,7 +26,6 @@ # define ENABLE_EWMH 1 #endif - /* ***************************************************************************** * SYSTEM HACKS @@ -475,15 +474,19 @@ enum { XTerm_restoreFG = 39, // change default fg color XTerm_restoreBG = 49, // change default bg color XTerm_dumpscreen = 55, // dump scrollback and all of screen - XTerm_locale = 701, // change locale - XTerm_Menu = 703, // set menu item - XTerm_Color_IT = 704, // change actual 'Italic' colour - XTerm_Color_tint = 705, // change actual tint colour + + URxvt_locale = 701, // change locale + URxvt_Menu = 703, // set menu item + URxvt_Color_IT = 704, // change actual 'Italic' colour + URxvt_Color_tint = 705, // change actual tint colour URxvt_font = 710, URxvt_boldFont = 711, URxvt_italicFont = 712, URxvt_boldItalicFont = 713, + + URxvt_view_up = 720, + URxvt_view_down = 721, }; /* Words starting with `Color_' are colours. Others are counts */ @@ -1473,6 +1476,7 @@ struct rxvt_term : zero_initialized, rxvt_vars { void scr_refresh (unsigned char refresh_type); bool scr_refresh_rend (rend_t mask, rend_t value); void scr_erase_screen (int mode); + void scr_erase_savelines (); void scr_touch (bool refresh); void scr_expose (int x, int y, int width, int height, bool refresh); rxvt_fontset *scr_find_fontset (rend_t r = DEFAULT_RSTYLE); diff --git a/src/screen.C b/src/screen.C
--- a/src/screen.C +++ b/src/screen.C @@ -204,17 +204,17 @@ rxvt_term::scr_reset () * Note: this is still needed so that all the scrollback lines are NULL */ screen.text = (text_t **)rxvt_calloc (total_rows, sizeof (text_t *)); - buf_text = (text_t **)rxvt_calloc (total_rows, sizeof (text_t *)); - drawn_text = (text_t **)rxvt_calloc (nrow, sizeof (text_t *)); - swap.text = (text_t **)rxvt_calloc (nrow, sizeof (text_t *)); + buf_text = (text_t **)rxvt_calloc (total_rows, sizeof (text_t *)); + drawn_text = (text_t **)rxvt_calloc (nrow, sizeof (text_t *)); + swap.text = (text_t **)rxvt_calloc (nrow, sizeof (text_t *)); screen.tlen = (int16_t *)rxvt_calloc (total_rows, sizeof (int16_t)); - swap.tlen = (int16_t *)rxvt_calloc (nrow, sizeof (int16_t)); + swap.tlen = (int16_t *)rxvt_calloc (nrow, sizeof (int16_t)); screen.rend = (rend_t **)rxvt_calloc (total_rows, sizeof (rend_t *)); - buf_rend = (rend_t **)rxvt_calloc (total_rows, sizeof (rend_t *)); - drawn_rend = (rend_t **)rxvt_calloc (nrow, sizeof (rend_t *)); - swap.rend = (rend_t **)rxvt_calloc (nrow, sizeof (rend_t *)); + buf_rend = (rend_t **)rxvt_calloc (total_rows, sizeof (rend_t *)); + drawn_rend = (rend_t **)rxvt_calloc (nrow, sizeof (rend_t *)); + swap.rend = (rend_t **)rxvt_calloc (nrow, sizeof (rend_t *)); for (p = 0; p < nrow; p++) { @@ -701,8 +701,8 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count, int spec) else if (j >= row1 && j <= row2) { /* move selected region too */ - selection.beg.row -= count; - selection.end.row -= count; + selection.beg.row -= count; + selection.end.row -= count; selection.mark.row -= count; } } @@ -720,13 +720,13 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count, int spec) if (j > 0) { - /* A: scroll up */ + /* scroll up */ - /* A1: Copy lines that will get clobbered by the rotation */ + /* Copy lines that will get clobbered by the rotation */ memcpy (buf_text, screen.text + row1, count * sizeof (text_t *)); memcpy (buf_rend, screen.rend + row1, count * sizeof (rend_t *)); - /* A2: Rotate lines */ + /* Rotate lines */ i = row2 - row1 - count + 1; memmove (screen.tlen + row1, screen.tlen + row1 + count, i * sizeof (int16_t)); memmove (screen.text + row1, screen.text + row1 + count, i * sizeof (text_t *)); @@ -736,16 +736,16 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count, int spec) } else /* if (j < 0) */ { - /* B: scroll down */ + /* scroll down */ - /* B1: Copy lines that will get clobbered by the rotation */ + /* Copy lines that will get clobbered by the rotation */ for (i = 0, j = row2; i < count; i++, j--) { buf_text[i] = screen.text[j]; buf_rend[i] = screen.rend[j]; } - /* B2: Rotate lines */ + /* Rotate lines */ for (j = row2, i = j - count; i >= row1; i--, j--) { screen.tlen[j] = screen.tlen[i]; @@ -757,7 +757,7 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count, int spec) count = -count; } - /* C: Resurrect lines */ + /* Resurrect lines */ memset (screen.tlen + j, 0, i * sizeof (int16_t)); memcpy (screen.text + j, buf_text, i * sizeof (text_t *)); memcpy (screen.rend + j, buf_rend, i * sizeof (text_t *)); @@ -1392,6 +1392,20 @@ rxvt_term::scr_erase_screen (int mode) } } +void +rxvt_term::scr_erase_savelines () +{ + want_refresh = 1; + ZERO_SCROLLBACK (); + + for (int i = 0; i < TermWin.saveLines; ++i) + if (screen.text [i]) + { + screen.tlen[i] = 0; + scr_blank_line (screen.text [i], screen.rend [i], (unsigned int)TermWin.ncol, DEFAULT_RSTYLE); + } +} + /* ------------------------------------------------------------------------- */ /* * Fill the screen with `E's @@ -1400,8 +1414,8 @@ rxvt_term::scr_erase_screen (int mode) void rxvt_term::scr_E () { - int i, j, k; - rend_t *r1, fs; + int i, j, k; + rend_t *r1, fs; want_refresh = 1; ZERO_SCROLLBACK ();
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 13:22:04 2024