cel-tui
    Preparing search index...

    Function emitBuffer

    • Emit a full cell buffer as an ANSI string for terminal output.

      Generates cursor positioning, SGR styling codes, and character content for every cell. Output is wrapped in synchronized output markers (CSI 2026) for flicker-free rendering.

      Optimizes by batching consecutive cells with the same style and only emitting SGR codes when the style changes.

      Parameters

      • buf: CellBuffer

        The cell buffer to render.

      • theme: Theme = defaultTheme

        Color theme mapping. Defaults to the ANSI 16 theme.

      • Optionaloptions: EmitOptions

        Optional terminal cursor state to apply before the synchronized output ends.

      Returns string

      A complete ANSI string ready to write to the terminal.