Don't show marks which start with an underscore

master
Ryan Dwyer 7 years ago
parent 0e2cc0af30
commit 5384fdcbc6

@ -786,16 +786,21 @@ static void update_marks_texture(struct sway_view *view,
size_t len = 0; size_t len = 0;
for (int i = 0; i < view->marks->length; ++i) { 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 *buffer = calloc(len + 1, 1);
char *part = malloc(len + 1); char *part = malloc(len + 1);
for (int i = 0; i < view->marks->length; ++i) { for (int i = 0; i < view->marks->length; ++i) {
char *mark = view->marks->items[i]; char *mark = view->marks->items[i];
if (mark[0] != '_') {
sprintf(part, "[%s]", mark); sprintf(part, "[%s]", mark);
strcat(buffer, part); strcat(buffer, part);
} }
}
free(part); free(part);
double scale = output->sway_output->wlr_output->scale; double scale = output->sway_output->wlr_output->scale;

Loading…
Cancel
Save