ensure align = left is the default and update documentation accordingly
fixes #1403
This commit is contained in:
committed by
Michael Stapelberg
parent
58c65a64fe
commit
bf1d0c9335
@ -188,12 +188,12 @@ static int stdin_string(void *context, const unsigned char *val, size_t len) {
|
||||
sasprintf(&(ctx->block.color), "%.*s", len, val);
|
||||
}
|
||||
if (strcasecmp(ctx->last_map_key, "align") == 0) {
|
||||
if (len == strlen("left") && !strncmp((const char *)val, "left", strlen("left"))) {
|
||||
ctx->block.align = ALIGN_LEFT;
|
||||
if (len == strlen("center") && !strncmp((const char *)val, "center", strlen("center"))) {
|
||||
ctx->block.align = ALIGN_CENTER;
|
||||
} else if (len == strlen("right") && !strncmp((const char *)val, "right", strlen("right"))) {
|
||||
ctx->block.align = ALIGN_RIGHT;
|
||||
} else {
|
||||
ctx->block.align = ALIGN_CENTER;
|
||||
ctx->block.align = ALIGN_LEFT;
|
||||
}
|
||||
} else if (strcasecmp(ctx->last_map_key, "min_width") == 0) {
|
||||
i3String *text = i3string_from_utf8_with_length((const char *)val, len);
|
||||
|
Reference in New Issue
Block a user