Skip to main content

NEL

AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Standard

NEL (Next Line) is a C1 control function that moves the cursor to the first position of the next line, effectively combining a carriage return and a line feed into a single operation.

Syntax​

ESC E         NEL — Next Line (7-bit)
0x85 NEL — Next Line (8-bit C1)
Formal syntax
NEL = ( 0x1b, "E" ) | 0x85 ;

Description​

Per ECMA-48 §8.3.86, NEL "causes the active presentation position to be moved to the line home position of the following line in the presentation component." In standard terminal usage, this means column 1 of the next line.

If the cursor is at the bottom of the scrolling region (set by DECSTBM), the display scrolls up before the cursor moves to the first column of the (now blank) bottom line.

NEL is functionally equivalent to CR+LF, but as a single C1 control it is atomic — there is no intermediate state where the cursor is at column 1 of the current line.

Examples​

printf 'Line 1\eELine 2'    # "Line 1" then "Line 2" starting at column 1

Specifications​

SpecificationSection
ECMA-48§8.3.86

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✓YesESC E listed as IMPLEMENTED in docs/escape_support.md; handler newline() at term/mod.rs:1470
Bobcat✓0.9.0Standard ESC sequence, handled in TerminalCtrl library
contour✓v0.1.0ESC E implemented in processSequence; calls moveCursorToNextLine()
foot✓YesImplemented in vt.c:504-506 as ESC E
Ghostty✓v1.0.0ESC E handled in stream.zig:2182-2188
iTerm2✓Yes
Kitty✓Yes
Konsole✓Yes
mintty✓YesHandled in do_esc() at src/termout.c:1962-1966
mlterm✓rel-0_2_1
PuTTY✓0.45
Rio✓v0.0.28
rxvt-unicode✓rxvt-unicode-1.2
st✓0.4
terminology✓v0.1.0
VT100✓Yes
VTE✓Yes
WezTerm✓YesHandled in performer.rs:450 via ControlCode::NEL and esc.rs:33 as EscCode::NextLine
Windows Terminal✓YesESC E dispatches LineFeed(WithReturn) in OutputStateMachineEngine.cpp:217-218
xterm✓YesImplemented in charproc.c:5442. Combines Index + CarriageReturn
xterm.js✓3.5.0
Multiplexers
cy✓v0.1.0
GNU Screen✓v.4.2.0NEL (ESC E) implemented in DoESC() at src/ansi.c:712
tmux✓0.9Next line: CR followed by LF
tuios✗No
Zellij✓v0.7.0

See also​