Ghostty
  • Docs
  • Discord
  • GitHub
Download
  • Download
  • Discord
  • GitHub

  • Ghostty Docs
  • About Ghostty
    • Overview
    • Reference
      • Cursor Backward Tabulation (CBT)
      • Cursor Horizontal Tabulation (CHT)
      • Cursor Next Line (CNL)
      • Cursor Preceding Line (CPL)
      • Cursor Backward (CUB)
      • Cursor Down (CUD)
      • Cursor Forward (CUF)
      • Cursor Position (CUP)
      • Cursor Up (CUU)
      • Delete Character (DCH)
      • Set Cursor Style (DECSCUSR)
      • Set Left and Right Margins (DECSLRM)
      • Set Top and Bottom Margins (DECSTBM)
      • Delete Line (DL)
      • Device Status Report (DSR)
      • Erase Character (ECH)
      • Erase in Display (ED)
      • Erase in Line (EL)
      • Horizontal Position Absolute (HPA)
      • Horizontal Position Relative (HPR)
      • Insert Character (ICH)
      • Insert Line (IL)
      • Repeat (REP)
      • Scroll Down (SD)
      • Scroll Up (SU)
      • Tab Clear (TBC)
      • Vertical Position Absolute (VPA)
      • Vertical Position Relative (VPR)
      • Shift-Escape Behavior (XTSHIFTESCAPE)
  • Ghostty Docs
  • About Ghostty
    • Overview
    • Reference
      • Cursor Backward Tabulation (CBT)
      • Cursor Horizontal Tabulation (CHT)
      • Cursor Next Line (CNL)
      • Cursor Preceding Line (CPL)
      • Cursor Backward (CUB)
      • Cursor Down (CUD)
      • Cursor Forward (CUF)
      • Cursor Position (CUP)
      • Cursor Up (CUU)
      • Delete Character (DCH)
      • Set Cursor Style (DECSCUSR)
      • Set Left and Right Margins (DECSLRM)
      • Set Top and Bottom Margins (DECSTBM)
      • Delete Line (DL)
      • Device Status Report (DSR)
      • Erase Character (ECH)
      • Erase in Display (ED)
      • Erase in Line (EL)
      • Horizontal Position Absolute (HPA)
      • Horizontal Position Relative (HPR)
      • Insert Character (ICH)
      • Insert Line (IL)
      • Repeat (REP)
      • Scroll Down (SD)
      • Scroll Up (SU)
      • Tab Clear (TBC)
      • Vertical Position Absolute (VPA)
      • Vertical Position Relative (VPR)
      • Shift-Escape Behavior (XTSHIFTESCAPE)
  • Ghostty Docs
  • Terminal API (VT)
  • CSI
  • Vertical Position Absolute (VPA)

Vertical Position Absolute (VPA)

Move the cursor to a specific row.

  1. 0x1B
    ESC
  2. 0x5B
    [
  3. ____
    y
  4. 0x64
    d

This sequence performs cursor position (CUP) with y set to the parameterized value and x set to the current cursor position. There is no additional or different behavior for using VPA.

Because this invokes CUP, the cursor column (y) can change if it is outside the bounds of the CUP operation. For example, if origin mode is set and the current cursor position is outside of the scroll region, the column will be adjusted.


Edit on GitHub
  • Docs
  • Discord
  • GitHub
  • Download

© 2025 Mitchell Hashimoto