renderer: track if fg/bg/cursor color is explicitly set by an OSC

The renderer must track if the foreground, background, and cursor colors
are explicitly set by an OSC so that changes are not overridden when the
config file is reloaded.
This commit is contained in:
Gregory Anders
2024-12-26 18:51:59 -06:00
parent 35b9ceee21
commit eef9664ef8
4 changed files with 148 additions and 82 deletions

View File

@@ -42,13 +42,11 @@ pub const Message = union(enum) {
old_key: font.SharedGridSet.Key,
},
/// Change the foreground color. This can be done separately from changing
/// the config file in response to an OSC 10 command.
foreground_color: terminal.color.RGB,
/// Change the foreground color as set by an OSC 10 command, if any.
foreground_color: ?terminal.color.RGB,
/// Change the background color. This can be done separately from changing
/// the config file in response to an OSC 11 command.
background_color: terminal.color.RGB,
/// Change the background color as set by an OSC 11 command, if any.
background_color: ?terminal.color.RGB,
/// Change the cursor color. This can be done separately from changing the
/// config file in response to an OSC 12 command.