NP, PP, PPA, PPR, PPB Page Movement
Move to another page of display memory, on terminals that have more than one.
NP Next Page
CSI Pn U
PP Preceding Page
CSI Pn V
PPA Page Position Absolute
CSI Pn SP P
PPR Page Position Forward
CSI Pn SP Q
PPB Page Position Backward
CSI Pn SP R
- Defaults
- Pn = 1
- ECMA-48
- §8.3.87 NP – Next Page, p. 51
- DEC STD 070
- §5.4.7 Next Page, p. 5-77
- VT510
- NP—Next Page
Some DEC terminals keep several pages of display memory, of which the screen shows one. These five functions move the cursor among them:
| Sequence | Function | Moves the cursor to |
|---|---|---|
CSI Pn U | NP, next page | the home position, Pn pages on |
CSI Pn V | PP, preceding page | the home position, Pn pages back |
CSI Pn SP P | PPA, page position absolute | the same line and column on page Pn |
CSI Pn SP Q | PPR, page position relative | the same line and column, Pn pages on |
CSI Pn SP R | PPB, page position backward | the same line and column, Pn pages back |
That is DEC STD 070’s definition, in §5.4.7 from p. 5-77. A request past the last page goes to the last page, and one before the first goes to the first. ECMA-48 defines NP and PP as showing another page, and says their effect on the cursor “is not defined by this Standard”; its PPA, PPR and PPB are §8.3.96, §8.3.98 and §8.3.97, all on p. 53. The VT510 manual has PP, PPA, PPR and PPB.
DEC STD 070 makes page movement part of levels 3 and 4 only. libghostty-vt has a single page and identifies itself as a level 2 terminal (see DA), so it does not implement any of these, and DEC STD 070 says unimplemented functions “shall be ignored as if they were not received” (§3.5.1.3, p. 3-20). xterm does not implement them either.
Support
| Terminal | Version | Support | Notes |
|---|---|---|---|
| VT220 | manual, 2nd ed., 1984 | No | not in the manual |
| VT510 | manual, 1st ed., 1993 | Yes | NP, with PP, PPA, PPR and PPB |
| xterm | patch 412, xterm-411a | No | none of the five is implemented |
| libghostty-vt | 0f171f6 | No | a single page, level 2; ignored |
| ConEmu | build 230724, its documentation | No | not in ConEmu’s list; ANSI escape codes |
Validation
NP-1: Ignored on a level 2 terminal
\e[2;3H
\e[U # NP
X
|_____|
|__X__|
|_____|
cursor 2,4
NP-2: PP is ignored too
\e[2;3H
\e[V # PP
X
|_____|
|__X__|
|_____|
NP-3: And the three with an intermediate byte
\e[2;3H
\e[2\sP # PPA
\e[\sQ # PPR
\e[\sR # PPB
X
|_____|
|__X__|
|_____|