ghostty/website/app/vt/hpr/page.mdx
Mitchell Hashimoto b927760149 terminal: HPR, VPR
2023-10-07 09:32:58 -07:00

18 lines
750 B
Plaintext

import VTSequence from "@/components/VTSequence";
# Horizontal Position Relative (HPR)
<VTSequence sequence={["CSI", "Px", "a"]} />
This sequence performs [cursor position (CUP)](/vt/cup) with `x` set
to the current cursor column plus `x` and `y` set to the current cursor row.
There is no additional or different behavior for using `HPR`.
The parameter `x` must be an integer greater than or equal to 1. If `x` is less than
or equal to 0, adjust `x` to be 1. If `x` is omitted, `x` defaults to 1.
Because this invokes `CUP`, the cursor row (`y`) can change if it is
outside the bounds of the `CUP` operation. For example, if
[origin mode](#TODO) is set and the current cursor position is outside
of the scroll region, the row will be adjusted.