]> git.neil.brown.name Git - edlib.git/commitdiff
render-lines: remove 'type'
authorNeilBrown <neil@brown.name>
Mon, 25 Jan 2016 03:04:53 +0000 (14:04 +1100)
committerNeilBrown <neil@brown.name>
Mon, 25 Jan 2016 03:04:53 +0000 (14:04 +1100)
No longer needed.

Signed-off-by: NeilBrown <neil@brown.name>
lang-python.c
render-lines.c

index 28d1eb539fb47b1c78f7e86b79eb8a1f5897cafd..7ee0af33108f2612f73089ca7ce96b7a9257426f 100644 (file)
@@ -77,7 +77,7 @@ static int get_cmd_info(struct cmd_info *ci, PyObject *args, PyObject *kwds);
 static inline PyObject *Pane_Frompane(struct pane *p)
 {
        Pane *pane;
-       if (p && p->handle->func == python_call.func) {
+       if (p && p->handle && p->handle->func == python_call.func) {
                pane = p->data;
                Py_INCREF(pane);
        } else {
index a885500ae4d5f6bd2d9a1ee93a9cba911ab7366b..72d0808dea0aa21cc3e50c0a9212db7859bad229 100644 (file)
@@ -93,7 +93,6 @@ struct rl_data {
        int             shift_left;
        int             prefix_len;
        int             header_lines;
-       struct command  type;
        int             typenum;
        struct pane     *pane;
        int             line_height;
@@ -1031,11 +1030,6 @@ DEF_CMD(render_lines_move_line)
        return 1;
 }
 
-DEF_CMD(render_lines_notify)
-{
-       return 1;
-}
-
 DEF_CMD(render_lines_notify_replace)
 {
        struct rl_data *rl = ci->home->data;
@@ -1152,8 +1146,7 @@ REDEF_CMD(render_lines_attach)
        rl->do_wrap = 1;
        rl->shift_left = 0;
        rl->header_lines = 0;
-       rl->type = render_lines_notify;
-       rl->typenum = doc_add_view(ci->focus, &rl->type);
+       rl->typenum = doc_add_view(ci->focus, NULL);
        rl->pane = pane_register(ci->focus, 0, &render_lines_handle.c, rl, NULL);
        call3("Request:Notify:Replace", rl->pane, 0, NULL);