vte2.91/doc/scrolling-region.txt

184 lines
26 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Here is what Xterm 388 and VTE 0.76 do for some of the escape sequences.
DEC STD 070 might say otherwise, and reportedly the actual behavior of DEC hardware is yet again different.
See https://gitlab.gnome.org/GNOME/vte/-/issues/2526 for details.
The black area inside (excluding) the stripes is the terminal area.
The blue rectangle is the scrolling region.
The words written on the canvas show what happens if the cursor is at that location when the said escape sequence arrives.
Some escape sequences are 90° or 180° rotations of each other, they share a common picture, it should be obvious to rotate.
 CUU (similarly: CUD, CUB ~ BS ~ CR, CUF ~ printing a letter) 
CUU, CUD, CUB, CUF: The picture shows the behavior written in DEC STD 070 (pp. 5-41..5-48) and implemented in Xterm and VTE.
Reportedly DEC terminals behave differently: If the cursor is outside the scroll area then it doesn't stop at the margin.
CR, BS: The picture shows the behavior implemented in Xterm and VTE.
DEC STD 070 (pp. 5-58, 5-63) says that if the cursor is outside the scroll area then it doesn't stop at the margin.
Reportedly DEC's actual behavior matches this.
🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙
🮙🮙▏ s t o p s h e r e , n o s c r o l l i n g ▕🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙 ↑ moves up 🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙▏ s t  o p s h e r e , n o s c r o l l i  n g ▕🮙🮙
🮙🮙   🮙🮙
🮙🮙   🮙🮙
🮙🮙   🮙🮙
🮙🮙   🮙🮙
🮙🮙   ↑ moves up 🮙🮙
🮙🮙   🮙🮙
🮙🮙 ↑ moves up   🮙🮙
🮙🮙   🮙🮙
🮙🮙  ↑ moves up  🮙🮙
🮙🮙   🮙🮙
🮙🮙   🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙 ↑ moves up 🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙
 RI (similarly: IND ~ LF, DECFI, DECBI) 
The picture shows the behavior implemented in Xterm and VTE.
DEC STD 070 (pp. 5-34..5-40) says that even if the cursor hits the margin outside the scroll area then the scroll area is
scrolled. Reportedly DEC terminals move the cursor in this case.
🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙
🮙🮙▏ s t o p s h e r e , n o s c r o l l i n g ▕🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙 ↑ moves up 🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙▏ stops here, no scrolling ▕▏ stops here and scrolls the blue region ▕▏ stops here, no scrolling ▕🮙🮙
🮙🮙   🮙🮙
🮙🮙   🮙🮙
🮙🮙   🮙🮙
🮙🮙   🮙🮙
🮙🮙   ↑ moves up 🮙🮙
🮙🮙   🮙🮙
🮙🮙 ↑ moves up   🮙🮙
🮙🮙   🮙🮙
🮙🮙  ↑ moves up  🮙🮙
🮙🮙   🮙🮙
🮙🮙   🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙 ↑ moves up 🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙
 SU, SD 
The picture shows the behavior implemented in Xterm and VTE.
According to DEC STD 070 (pp. 5-91..5-92) they move the page relative to the window, an entirely different concept unrelated
to margins. See also https://gitlab.gnome.org/GNOME/vte/-/issues/2663#note_1860599.
🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙 scrolls 🮙🮙
🮙🮙 🮙🮙
🮙🮙 the 🮙🮙
🮙🮙   🮙🮙
🮙🮙  blue  🮙🮙
🮙🮙   🮙🮙
🮙🮙  region,  🮙🮙
🮙🮙   🮙🮙
🮙🮙  no  🮙🮙
🮙🮙   🮙🮙
🮙🮙  matter  🮙🮙
🮙🮙   🮙🮙
🮙🮙  where  🮙🮙
🮙🮙   🮙🮙
🮙🮙  the 🮙🮙
🮙🮙 🮙🮙
🮙🮙 cursor 🮙🮙
🮙🮙 🮙🮙
🮙🮙 is 🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙
 IL, DL, DECIC, DECDC, SL, SR 
IL, DL, DECIC, DECDC: The picture shows what's written in DEC STD 070 (pp. 5-146..5-151) and implemented in Xterm and VTE.
Reportedly the behavior of DEC terminals also matches.
SL, SR aren't available in DEC, they could be an Xterm extension.
🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙 does nothing 🮙🮙
🮙🮙 🮙🮙
🮙🮙 ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ 🮙🮙
🮙🮙 ▕ ▏ 🮙🮙
🮙🮙 ▕ scrolls the blue region, further restricted to: ▏ 🮙🮙
🮙🮙 ▕ - IL, DL: cursor's row and below ▏ 🮙🮙
🮙🮙 ▕ - DECIC, DECDC: cursor's column and its right ▏ 🮙🮙
🮙🮙 ▕ - SL, SR: no further restriction ▏ 🮙🮙
🮙🮙 ▕ ▏ does nothing 🮙🮙
🮙🮙 ▕ ·<-------------------------------------------------->▏ 🮙🮙
🮙🮙 does nothing ▕ ^ DECIC, DECDC ▏ 🮙🮙
🮙🮙 ▕ | ▏ 🮙🮙
🮙🮙 ▕ | IL, DL ▏ 🮙🮙
🮙🮙 ▕ | ▏ 🮙🮙
🮙🮙 ▕ v ▏ 🮙🮙
🮙🮙 ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ 🮙🮙
🮙🮙 🮙🮙
🮙🮙 does nothing 🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙 🮙🮙
🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙
 ICH, DCH 
The picture shows the behavior written in DEC STD 070 (pp. 5-142..5-145) and implemented in Xterm and VTE.
Reportedly DEC hardware behave differently if the cursor is outside the top/bottom margins, they shift to/from the right
edge of the screen rather than the right margin.
🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙
🮙🮙 ▕ ▏ 🮙🮙
🮙🮙 ▕ ▏ 🮙🮙
🮙🮙 ▕ scrolls ·<--->▏ 🮙🮙
🮙🮙 ▕ the ▏ 🮙🮙
🮙🮙 ▕ cursor's ▏ d 🮙🮙
🮙🮙 ▕ row ▏ o 🮙🮙
🮙🮙 ▕ between ▏ e 🮙🮙
🮙🮙 ▕ the ▏ s 🮙🮙
🮙🮙 d ▕ cursor ▏ 🮙🮙
🮙🮙 o ▕ and ▏ n 🮙🮙
🮙🮙 e ▕ the ·<------------------>▏ o 🮙🮙
🮙🮙 s ▕ right ▏ t 🮙🮙
🮙🮙 ▕ margin ▏ h 🮙🮙
🮙🮙 n ▕ (the ▏ i 🮙🮙
🮙🮙 o ▕ top ▏ n 🮙🮙
🮙🮙 t ▕ and ▏ g 🮙🮙
🮙🮙 h ▕ bottom ▏ 🮙🮙
🮙🮙 i ▕ margins ▏ 🮙🮙
🮙🮙 n ▕ don't ▏ 🮙🮙
🮙🮙 g ▕ matter) ▏ 🮙🮙
🮙🮙 ▕ ▏ 🮙🮙
🮙🮙 ▕ ·<-------------------------------------------------->▏ 🮙🮙
🮙🮙 ▕ ▏ 🮙🮙
🮙🮙 ▕ ▏ 🮙🮙
🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙🮙