]> git.neil.brown.name Git - edlib.git/blobdiff - render-lines.c
TODO: clean out done items.
[edlib.git] / render-lines.c
index f528f5c3797c5239a05e2c518a10c99572557d54..52eeb416c4e061e782730cdf9e8d82db3952399d 100644 (file)
@@ -909,7 +909,7 @@ static int render(struct mark *pm, struct pane *p safe,
                free(a);
        } else if (strstarts(s, "image:")) {
                home_call(focus, "Draw:clear", p);
-               home_call(focus, "Draw:image", p, 16, NULL, s+6);
+               home_call(focus, "Draw:image", p, 0, NULL, s+6, 0, NULL, "S");
                rl->background_uniform = False;
        } else
                home_call(focus, "Draw:clear", p, 0, NULL, "");
@@ -1357,7 +1357,7 @@ DEF_CMD(render_lines_refresh)
        return 1;
 }
 
-DEF_CMD(render_lines_close)
+DEF_CMD_CLOSED(render_lines_close)
 {
        struct rl_data *rl = ci->home->data;
 
@@ -1368,7 +1368,7 @@ DEF_CMD(render_lines_close)
        return 1;
 }
 
-DEF_CMD(render_lines_close_mark)
+DEF_CMD_CLOSED(render_lines_close_mark)
 {
        struct mark *m = ci->mark;
 
@@ -1594,7 +1594,7 @@ DEF_CMD(render_lines_set_cursor)
                                        ;
                                }
                                call(tag, focus, 0, m2, xyattr,
-                                    0, ci->mark, NULL,
+                                    0, ci->mark, action,
                                     cih.x, cih.y);
                        }
                        m = m2;
@@ -1639,7 +1639,7 @@ DEF_CMD(render_lines_action)
        tag = get_action_tag(ci->str, attr);
        if (!tag)
                return Efallthrough;
-       call(tag, focus, 0, m, attr);
+       call(tag, focus, 0, m, attr, 0, NULL, ci->str);
        return 1;
 }
 
@@ -1660,7 +1660,7 @@ DEF_CMD(render_lines_move_pos)
                /* top line not fully displayed, being in that line is
                 * not sufficient */
                top = vmark_next(top);
-       if (bot)
+       if (bot && rl->tail_height)
                /* last line might not be fully displayed, so don't assume */
                bot = vmark_prev(bot);
        if (!top || !bot ||
@@ -1726,13 +1726,13 @@ DEF_CMD(render_lines_move_line)
        num = RPT_NUM(ci);
        if (call("doc:EOL", ci->focus, num, m, NULL, 1) <= 0) {
                rl->i_moved = 0;
-               return Efail;
+               return Efalse;
        }
        if (RPT_NUM(ci) < 0) {
                /* at end of target line, move to start */
                if (call("doc:EOL", ci->focus, -1, m) <= 0) {
                        rl->i_moved = 0;
-                       return Efail;
+                       return Efalse;
                }
        }