* recognised has "wrap-" stripped and is used for the
* head and tail. Default is fg:blue,underline
* hide - Text is hidden if cursor is not within range.
- * NOT YET IMPLEMENTED
*
* "nn" is measured in "points" which is 1/10 the nominal width of chars
* in the default font size, which is called "10". A positive value is
* it.
*/
uint8_t hide; /* This and consecutive render_items
- * with the same hide nmber form a
+ * with the same hide number form a
* hidden extent which is visible when
* the cursor is in it.
*/
* which should leave either a trailing comma, or an
* empty string.
*/
- buf_append(&attr, ',');
old_len = attr.len;
+ buf_append(&attr, ',');
foreach_attr(a, v, st, line) {
if (amatch(a, "centre") || amatch(a, "center") ||
amatch(a, "ctab")) {
struct xy xyscale = pane_scale(focus);
int scale = xyscale.x;
struct xy size= {-1, -1};
+ char mode[30] = "";
const char *a, *v;
const char *end;
*/
map_offset = v - orig_line;
parse_map(v, &rows, &cols);
+ if (rows > 0 && cols > 0)
+ snprintf(mode, sizeof(mode),
+ ":%dx%d", cols, rows);
}
}
pane_resize(p, (p->parent->w - width)/2, p->y, width, height);
}
if (fname && dodraw)
- home_call(focus, "Draw:image", p, 5, NULL, fname,
- 0, NULL, NULL, cols, rows);
+ home_call(focus, "Draw:image", p, 0, NULL, fname,
+ 0, NULL, mode);
free(fname);
return 1;
}
-DEF_CMD(renderline_close)
+DEF_CMD_CLOSED(renderline_close)
{
struct rline_data *rd = ci->home->data;
struct render_item *ri = rd->content;
key_add(rl_map, "get-attr", &renderline_get);
key_add(rl_map, "render-line:set", &renderline_set);
key_add(rl_map, "Close", &renderline_close);
- key_add(rl_map, "Free", &edlib_do_free);
}
p = pane_register(ci->focus, ci->num, &renderline_handle.c);