Missing HVP (CSI f) support — treated as unhandled instead of CUP
Summary
The vt100 parser handles CUP (CSI Ps ; Ps H) but does not handle its
equivalent HVP (CSI Ps ; Ps f). Per ECMA-48 §8.3.63, HVP (Horizontal
and Vertical Position) is functionally identical to CUP (Cursor Position)
— both set the cursor to the specified row and column. The parser
currently sends HVP to the unhandled_csi callback instead.
Affected code
In src/perform.rs, the csi_dispatch match for no-intermediate CSI
sequences handles 'H' but not 'f':
'H' => self.screen.cup(canonicalize_params_2(params, 1, 1)),
Suggested fix
Add 'f' to the existing 'H' arm:
'H' | 'f' => self.screen.cup(canonicalize_params_2(params, 1, 1)),
Real-world impact
Applications that use HVP include mpv with --vo=sixel, which emits
ESC [ <row> ; <col> f to position the cursor before drawing each Sixel
frame. Without this, cursor positioning is silently ignored and image
placement breaks.
Reference
Missing HVP (CSI f) support — treated as unhandled instead of CUP
Summary
The vt100 parser handles CUP (
CSI Ps ; Ps H) but does not handle itsequivalent HVP (
CSI Ps ; Ps f). Per ECMA-48 §8.3.63, HVP (Horizontaland Vertical Position) is functionally identical to CUP (Cursor Position)
— both set the cursor to the specified row and column. The parser
currently sends HVP to the
unhandled_csicallback instead.Affected code
In
src/perform.rs, thecsi_dispatchmatch for no-intermediate CSIsequences handles
'H'but not'f':Suggested fix
Add
'f'to the existing'H'arm:Real-world impact
Applications that use HVP include mpv with
--vo=sixel, which emitsESC [ <row> ; <col> fto position the cursor before drawing each Sixelframe. Without this, cursor positioning is silently ignored and image
placement breaks.
Reference
CSI Ps ; Ps HandCSI Ps ; Ps fas "Cursor Position"