diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-03-20 07:13:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-03-20 07:13:03 +0000 |
commit | 1260bce0a540ca0259135dabb5e97bb707385c6d (patch) | |
tree | 9e7593881408a7b783bebcd20b127ac257faa049 /usr.bin | |
parent | 0aed0f80ad9805383e52b485be6ff1fc1eef91ed (diff) |
Bit more logging to show drawing errors.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/format-draw.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/tmux/format-draw.c b/usr.bin/tmux/format-draw.c index 845ce1afeb2..ab275cd940b 100644 --- a/usr.bin/tmux/format-draw.c +++ b/usr.bin/tmux/format-draw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format-draw.c,v 1.2 2019/03/18 21:55:04 nicm Exp $ */ +/* $OpenBSD: format-draw.c,v 1.3 2019/03/20 07:13:02 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -527,6 +527,7 @@ format_draw(struct screen_write_ctx *octx, const struct grid_cell *base, style_set(&sy, base); TAILQ_INIT(&frs); + log_debug("%s: %s", __func__, expanded); /* * We build three screens for left, right, centre alignment, one for @@ -574,10 +575,13 @@ format_draw(struct screen_write_ctx *octx, const struct grid_cell *base, /* This is a style. Work out where the end is and parse it. */ end = format_skip(cp + 2, "]"); - if (end == NULL) + if (end == NULL) { + log_debug("no terminating ] at '%s'", cp + 2); return; + } tmp = xstrndup(cp + 2, end - (cp + 2)); if (style_parse(&sy, base, tmp) != 0) { + log_debug("invalid style '%s'", tmp); free(tmp); return; } |