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
  • Cursor Next Line (CNL)

Cursor Next Line (CNL)

Move the cursor down `n` cells and to the beginning of the line.

  1. 0x1B
    ESC
  2. 0x5B
    [
  3. ____
    n
  4. 0x45
    E

The parameter n must be an integer greater than or equal to 1. If n is less than or equal to 0, adjust n to be 1. If n is omitted, n defaults to 1.

The logic of this sequence is identical to Cursor Down (CUD) followed by Carriage Return (CR).


Edit on GitHub
  • Docs
  • Discord
  • GitHub
  • Download

© 2025 Mitchell Hashimoto