Spawning new terminal with --config from parent instance

Reference: https://codeberg.org/dnkl/foot/issues/1622
Signed-off-by: Stéphane Klein <contact@stephane-klein.info>
This commit is contained in:
Stéphane Klein 2026-01-09 00:31:04 +01:00
parent b78cc92322
commit 6d8027dd94
5 changed files with 21 additions and 1 deletions

View file

@ -3442,6 +3442,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"),
@ -3895,6 +3896,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);
@ -3995,6 +3997,7 @@ UNITTEST
void
config_free(struct config *conf)
{
free(conf->conf_path);
free(conf->term);
free(conf->shell);
free(conf->title);