mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 18:01:29 +00:00
Don't show marks which start with an underscore
This commit is contained in:
parent
0e2cc0af30
commit
5384fdcbc6
|
@ -786,16 +786,21 @@ 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];
|
||||
if (mark[0] != '_') {
|
||||
sprintf(part, "[%s]", mark);
|
||||
strcat(buffer, part);
|
||||
}
|
||||
}
|
||||
free(part);
|
||||
|
||||
double scale = output->sway_output->wlr_output->scale;
|
||||
|
|
Loading…
Reference in a new issue