diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/tree/view.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index e26159d2..8db5c9d5 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -786,15 +786,20 @@ static void update_marks_texture(struct sway_view *view, size_t len = 0; for (int i = 0; i < view->marks->length; ++i) { - len += strlen((char *)view->marks->items[i]) + 2; + char *mark = view->marks->items[i]; + if (mark[0] != '_') { + len += strlen(mark) + 2; + } } char *buffer = calloc(len + 1, 1); char *part = malloc(len + 1); for (int i = 0; i < view->marks->length; ++i) { char *mark = view->marks->items[i]; - sprintf(part, "[%s]", mark); - strcat(buffer, part); + if (mark[0] != '_') { + sprintf(part, "[%s]", mark); + strcat(buffer, part); + } } free(part); |