From 84950a0d505b007aa82fcf70f5c5df1bcbd37925 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 6 Oct 2023 09:02:51 -0700 Subject: [PATCH] website: cub top/bottom scroll with extended wrap --- website/app/vt/cub/page.mdx | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/website/app/vt/cub/page.mdx b/website/app/vt/cub/page.mdx index b4b5ed0aa..a0fd019dd 100644 --- a/website/app/vt/cub/page.mdx +++ b/website/app/vt/cub/page.mdx @@ -120,4 +120,25 @@ printf "X" |B_________| ``` -### TODO: Reverse Wrap, Scroll Region Validations +### CUB V-5: Extended Reverse Wrap Wraps to Bottom + +```bash +cols=$(tput cols) +printf "\033[?7h" # enable wraparound +printf "\033[?1045h" # enable extended reverse wrap +printf "\033[1;1H" # move to top-left +printf "\033[0J" # clear screen +printf "\033[1;3r" # set scrolling region +echo "A" +printf "B" +printf "\033[D" # move back one +printf "\033[${cols}D" # move back entire width +printf "\033[D" # move back one +printf "X" +``` + +``` +|A_________| +|B_________| +|_________Xc +```