mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-31 12:49:03 +00:00
libghostty: mark semantic stream failures
The libghostty-vt stream is made to be infallible: in the case of any error it just logs and moves on. That's because a terminal can't really... stop, under normal operations. But, under special operations (fuzzing, replays, etc.) it can and should stop! Rather than make the operation fallible, its simply enough for me at least to know that something went wrong. This is a simple change that adds a simple flag that is flagged to true when such a scenario happens. For normal Ghostty GUI operations, this isn't used at all. For libghostty consumers they can choose to read it if they want, but don't have to. This also adds a C API to read it.
This commit is contained in:
@@ -1197,6 +1197,22 @@ typedef enum GHOSTTY_ENUM_TYPED {
|
||||
* Output type: bool *
|
||||
*/
|
||||
GHOSTTY_TERMINAL_DATA_VIEWPORT_ACTIVE = 32,
|
||||
|
||||
/**
|
||||
* Whether VT processing encountered a non-gracefully handled error that may
|
||||
* have prevented a terminal-owned semantic update.
|
||||
*
|
||||
* Processing remains best-effort, and ghostty_terminal_reset() does not
|
||||
* clear it. Gracefully handled protocol failures, configured limits,
|
||||
* malformed or unsupported input, and failures limited to external effects
|
||||
* or query responses do not set it.
|
||||
*
|
||||
* This can't currently be unset. This is purely informational to consumers
|
||||
* if there was some error that happened at some point during VT processing.
|
||||
*
|
||||
* Output type: bool *
|
||||
*/
|
||||
GHOSTTY_TERMINAL_DATA_VT_PROCESSING_ERROR = 33,
|
||||
GHOSTTY_TERMINAL_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
|
||||
} GhosttyTerminalData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user