When appending a layout containing a marked container, make sure that any other containers with the same mark

are unmarked during insertion of the new container.

fixes #1956
This commit is contained in:
Ingo Bürk
2015-09-25 19:17:46 +02:00
parent ee5db875c2
commit dd7a532160
4 changed files with 102 additions and 38 deletions

View File

@ -338,6 +338,10 @@ static int json_string(void *ctx, const unsigned char *val, size_t len) {
} else if (strcasecmp(last_key, "mark") == 0) {
char *buf = NULL;
sasprintf(&buf, "%.*s", (int)len, val);
/* We unmark any containers using this mark to avoid duplicates. */
con_unmark(buf);
json_node->mark = buf;
} else if (strcasecmp(last_key, "floating") == 0) {
char *buf = NULL;