diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2024-09-06 19:09:41 -0400 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2024-09-06 19:09:41 -0400 |
| commit | 499b50b4da54bd38c91a88b5359fbc8275c56381 (patch) | |
| tree | e707f21f6ab32c5851278e0e2da0ee0318e67a51 | |
| parent | a11a44c16998e317d7cd24c1fe660119b3a17aa5 (diff) | |
container: Skip % char if it doesn't match a view property
The else condition was missed here and we would never skip the % char
if it didn't end up matching with any property. Since we fail to skip
we would re-evaluate the % in an infinite loop never achieving any
forward-progress.
Fixes: https://github.com/swaywm/sway/issues/8333
(cherry picked from commit fc6b8d6af2a8b5c68bbf49753b0e560ad2cff208)
| -rw-r--r-- | sway/tree/container.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 188d3223..f482b06b 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -714,6 +714,10 @@ size_t parse_title_format(struct sway_container *container, char *buffer) { } else if (strncmp(next, "%shell", 6) == 0) { len += append_prop(buffer, view_get_shell(container->view)); format += 6; + } else { + lenient_strcat(buffer, "%"); + ++format; + ++len; } } else { lenient_strcat(buffer, "%"); |
