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
| Specification | Section |
|---|---|
| ECMA-48 | §8.3.86 |
Terminal support
| Terminal | Support | Version | Notes |
|---|---|---|---|
| Terminal Emulators | |||
| Alacritty | ✓ | Yes | ESC E listed as IMPLEMENTED in docs/escape_support.md; handler newline() at term/mod.rs:1470 |
| Bobcat | ✓ | 0.9.0 | Standard ESC sequence, handled in TerminalCtrl library |
| contour | ✓ | v0.1.0 | ESC E implemented in processSequence; calls moveCursorToNextLine() |
| foot | ✓ | Yes | Implemented in vt.c:504-506 as ESC E |
| Ghostty | ✓ | v1.0.0 | ESC E handled in stream.zig:2182-2188 |
| iTerm2 | ✓ | Yes | |
| Kitty | ✓ | Yes | |
| Konsole | ✓ | Yes | |
| mintty | ✓ | Yes | Handled 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 | ✓ | Yes | Handled in performer.rs:450 via ControlCode::NEL and esc.rs:33 as EscCode::NextLine |
| Windows Terminal | ✓ | Yes | ESC E dispatches LineFeed(WithReturn) in OutputStateMachineEngine.cpp:217-218 |
| xterm | ✓ | Yes | Implemented in charproc.c:5442. Combines Index + CarriageReturn |
| xterm.js | ✓ | 3.5.0 | |
| Multiplexers | |||
| cy | ✓ | v0.1.0 | |
| GNU Screen | ✓ | v.4.2.0 | NEL (ESC E) implemented in DoESC() at src/ansi.c:712 |
| tmux | ✓ | 0.9 | Next line: CR followed by LF |
| tuios | ✗ | No | |
| Zellij | ✓ | v0.7.0 | |
See also
- CR — Carriage Return — Move to column 1 of current line
- LF — Line Feed — Move down one line
- IND — Index — Move down one line without carriage return