OSC 720 Scroll View Up
Move rxvt-unicode's view up or down its scrollback, or clear the scrollback.
OSC 720 ; Pn ST
- ECMA-48
- §8.3.89 OSC – Operating System Command, p. 51
- Specification
- urxvt(7), XTerm Operating System Commands
OSC 720 ; Pn ST moves rxvt-unicode’s view up its scrollback by Pn lines, and OSC 721 ; Pn ST down it, as far as there is scrollback to move through. Neither changes the screen’s contents or the cursor, only which lines are in view; SU and SD move the text instead. A Pn of 0 clears the scrollback, and since rxvt-unicode reads Pn as a number with nothing to say it was not one, so does an empty or non-numeric Pn (urxvt(7)).
A default xterm has no OSC 720 and ignores it (the OSC numbers it knows). The cases follow xterm.
libghostty-vt does not recognize OSC 720 either: its OSC parser in osc.zig has no state for the number, so the string is dropped, and the cases pass. The same holds for 721.
Support
| Terminal | Version | Support | Notes |
|---|---|---|---|
| VT220 | manual, 2nd ed., 1984 | No | OSC is not among the controls it recognizes (§4.2) |
| VT510 | manual, 1st ed., 1993 | No | ignores an OSC string (chapter 4) |
| xterm | patch 412, xterm-411a | No | ignored |
| libghostty-vt | 83edd49 | No | ignored |
| Konsole | 26.11.70, a24c3d71 | No | not among the OSC numbers it handles (Vt102Emulation.h) |
| ConEmu | build 230724, its documentation | No | not in its ANSI escape codes |
| rxvt-unicode | 9.31, urxvtperl(3) | Yes | 720 and 721; 0 clears the scrollback (urxvt(7)) |
Validation
OSC720-1: The screen is left as it was
AB\r\n
CD
\e]720;1\a
\e]721;1\a
|AB___|
|CD___|
cursor 2,3
reply none
OSC720-2: Nor does 0 erase anything
AB
\e]720;0\a
|AB___|
cursor 1,3