No longer needed.
Signed-off-by: NeilBrown <neil@brown.name>
return container_of(p, struct editor, root);
}
-struct pane *pane_with_cursor(struct pane *p, int *oxp, int *oyp)
-{
- struct pane *ret = p;
- int ox = 0, oy = 0;
- if (oxp) {
- *oxp = 0;
- *oyp = 0;
- }
- while (p) {
- ox += p->x;
- oy += p->y;
-
- if (p->cx >= 0 && p->cy >= 0) {
- ret = p;
- if (oxp) {
- *oxp = ox;
- *oyp = oy;
- }
- }
- p = p->focus;
- }
- return ret;
-}
-
DEF_CMD(pane_callback)
{
struct call_return *cr = container_of(ci->comm, struct call_return, c);
void pane_check_size(struct pane *p);
void pane_refresh(struct pane *p);
void pane_focus(struct pane *p);
-struct pane *pane_with_cursor(struct pane *p, int *ox, int *oy);
void pane_damaged(struct pane *p, int type);
struct pane *pane_to_root(struct pane *p, int *x, int *y, int *z,
int *w, int *h);
REDEF_CMD(emacs_move)
{
struct move_command *mv = container_of(ci->comm, struct move_command, cmd);
- struct pane *cursor_pane = pane_with_cursor(ci->home, NULL, NULL);
+ struct pane *cursor_pane = ci->focus;
int old_x = -1;
struct cmd_info ci2 = {0};
int ret = 0;
struct match_state *rxl_prepare(unsigned short *rxl);
void rxl_free_state(struct match_state *s);
int rxl_advance(struct match_state *st, wint_t ch, int flag, int restart);
-