From dc0c8550c38ffd0983789573a1a0d4417016c2c7 Mon Sep 17 00:00:00 2001 From: Stéphane Klein Date: Fri, 9 Jan 2026 00:31:04 +0100 Subject: Spawning new terminal with --config from parent instance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reference: https://codeberg.org/dnkl/foot/issues/1622 Signed-off-by: Stéphane Klein --- config.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config.c') diff --git a/config.c b/config.c index b1ff329c..bbac7fb6 100644 --- a/config.c +++ b/config.c @@ -3459,6 +3459,7 @@ config_load(struct config *conf, const char *conf_path, enum fcft_capabilities fcft_caps = fcft_capabilities(); *conf = (struct config) { + .conf_path = (conf_path ? xstrdup(conf_path) : NULL), .term = xstrdup(FOOT_DEFAULT_TERM), .shell = get_shell(), .title = xstrdup("foot"), @@ -3914,6 +3915,7 @@ config_clone(const struct config *old) struct config *conf = xmalloc(sizeof(*conf)); *conf = *old; + conf->conf_path = (old->conf_path ? xstrdup(old->conf_path) : NULL); conf->term = xstrdup(old->term); conf->shell = xstrdup(old->shell); conf->title = xstrdup(old->title); @@ -4014,6 +4016,7 @@ UNITTEST void config_free(struct config *conf) { + free(conf->conf_path); free(conf->term); free(conf->shell); free(conf->title); -- cgit v1.3