mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-01-06 13:27:49 +00:00
config: richer diagnostics for errors
Rather than storing a list of errors we now store a list of "diagnostics." Each diagnostic has a richer set of structured information, including a message, a key, the location where it occurred. This lets us show more detailed messages, more human friendly messages, and also let's us filter by key or location. We don't take advantage of all of this capability in this initial commit, but we do use every field for something.
This commit is contained in:
@@ -291,7 +291,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
const char* message;
|
||||
} ghostty_error_s;
|
||||
} ghostty_diagnostic_s;
|
||||
|
||||
typedef struct {
|
||||
double tl_px_x;
|
||||
@@ -615,8 +615,8 @@ bool ghostty_config_get(ghostty_config_t, void*, const char*, uintptr_t);
|
||||
ghostty_input_trigger_s ghostty_config_trigger(ghostty_config_t,
|
||||
const char*,
|
||||
uintptr_t);
|
||||
uint32_t ghostty_config_errors_count(ghostty_config_t);
|
||||
ghostty_error_s ghostty_config_get_error(ghostty_config_t, uint32_t);
|
||||
uint32_t ghostty_config_diagnostics_count(ghostty_config_t);
|
||||
ghostty_diagnostic_s ghostty_config_get_diagnostic(ghostty_config_t, uint32_t);
|
||||
void ghostty_config_open();
|
||||
|
||||
ghostty_app_t ghostty_app_new(const ghostty_runtime_config_s*,
|
||||
|
||||
Reference in New Issue
Block a user