return 1;
}
- if (kd->global && strcmp(ci->key, "global-key-root") == 0) {
- ci->focus = ci->home;
- return 1;
- }
if (kd->global && strncmp(ci->key, "local-", 6) == 0) {
if (strcmp(ci->key, "local-set-key") == 0 ||
strcmp(ci->key, "local-add-keymap") == 0 ||
if (strchr(style, 'D')) {
int x = 0, y = 0;
pane_to_root(ci->focus, &x, &y, &z, NULL, NULL);
- root = call_pane("global-key-root", ci->focus, 0, NULL, 0);
+ root = call_pane("RootPane", ci->focus, 0, NULL, 0);
} else
root = call_pane("ThisPane", ci->focus, 0, NULL, 0);
if (!root)
return 1;
}
+DEF_CMD(tile_root)
+{
+ struct pane *p = ci->home;
+ struct tileinfo *ti = p->data;
+ while (ti->direction != Neither) {
+ p = p->parent;
+ ti = p->data;
+ }
+ ci->focus = p;
+ return 1;
+}
+
void edlib_init(struct editor *ed)
{
tile_map = key_alloc();
key_add(tile_map, "WindowOP", &tile_command);
key_add(tile_map, "OtherPane", &tile_other);
key_add(tile_map, "ThisPane", &tile_this);
+ key_add(tile_map, "RootPane", &tile_root);
key_add(ed->commands, "attach-tile", &tile_attach);
}