From: NeilBrown Date: Mon, 25 Jan 2016 03:04:53 +0000 (+1100) Subject: render-lines: remove 'type' X-Git-Tag: lca2016~9 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=a2e60366178ebf930c8c19f0abbdce4db897fc9d;p=edlib.git render-lines: remove 'type' No longer needed. Signed-off-by: NeilBrown --- diff --git a/lang-python.c b/lang-python.c index 28d1eb53..7ee0af33 100644 --- a/lang-python.c +++ b/lang-python.c @@ -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 { diff --git a/render-lines.c b/render-lines.c index a885500a..72d0808d 100644 --- a/render-lines.c +++ b/render-lines.c @@ -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);