These need to be quoted.
Signed-off-by: NeilBrown <neil@brown.name>
l = wcrtomb(t, wch, &ps);
buf_concat_len(b, t, l);
}
+
+void buf_append_byte(struct buf *b, char c)
+{
+ buf_concat_len(b, &c, 1);
+}
void buf_concat(struct buf *b, char *s);
void buf_concat_len(struct buf *b, char *s, int l);
void buf_append(struct buf *b, wchar_t wch);
+void buf_append_byte(struct buf *b, char c);
static inline char *buf_final(struct buf *b)
{
if (b->b)
struct pane *par, *pop;
struct cmd_info ci2 = {0};
- pop = pane_attach(ci->focus, "popup", ed->docs->home, "DM1");
+ pop = pane_attach(ci->focus, "popup", ed->docs->home, "DM1r");
+ if (!pop)
+ return -1;
par = pane_final_child(pop);
attr_set_str(&par->attrs, "line-format", "%+name", -1);
int w, adjust, l;
if (*n != '%' || n[1] == '%') {
- buf_append(&ret, *n);
+ buf_append_byte(&ret, *n);
if (*n == '%')
n += 1;
n += 1;
if (!val)
val = "-";
if (*n != ':') {
- buf_concat(&ret, val);
+ while (*val) {
+ if (*val == '<')
+ buf_append_byte(&ret, '<');
+ buf_append_byte(&ret, *val);
+ val += 1;
+ }
continue;
}
w = 0;
}
while (*val && w > 0 ) {
- buf_append(&ret, *val);
+ if (*val == '<')
+ buf_append_byte(&ret, '<');
+ buf_append_byte(&ret, *val);
w -= 1;
val += 1;
}