Skip to content

Missing HVP (CSI f) support — treated as unhandled instead of CUP #26

Description

@maurerdietmar

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions