diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-15 14:35:25 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-17 08:29:14 +1000 |
commit | 5384fdcbc64c90be01dcfe4067dd9a2a9328f053 (patch) | |
tree | 2578d9262ae2a1461b90055e6a8ec627c9682b4e /sway/tree | |
parent | 0e2cc0af3049c6d1b91bda3081238e2e723e81b7 (diff) |
Don't show marks which start with an underscore
Diffstat (limited to 'sway/tree')
-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); |