diff options
Diffstat (limited to 'web/web_prompt.c')
-rw-r--r-- | web/web_prompt.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/web/web_prompt.c b/web/web_prompt.c index 3b5bc68..3f5521a 100644 --- a/web/web_prompt.c +++ b/web/web_prompt.c @@ -89,13 +89,22 @@ static void flush_list_opts() for (int i = 0; i < list_optc; ++i) { struct dom_elem *e = dom_elem_init(NULL, "div", 2); - asprintf(&e->content, "[%d] %s", i + 1, list_optv[i]); dom_elem_add_attr(e, "class", "key"); char buf[64]; sprintf(buf, "append:%d;submit", i + 1); dom_elem_add_attr(e, "data-command", buf); + struct dom_elem *child; + child = dom_elem_init(NULL, "span", 1); + asprintf(&child->content, "[%d]", i + 1); + dom_elem_add_attr(child, "class", "keyboard-val"); + dom_elem_add_child(e, child); + + sprintf(buf, "\u2002%s", list_optv[i]); + child = dom_text_init(buf); + dom_elem_add_child(e, child); + elemv[i] = e; } |