version 1.51, 2013/03/21 16:54:37 |
version 1.52, 2013/03/22 15:52:40 |
|
|
{ MODEKEYCOPY_BOTTOMLINE, "bottom-line" }, |
{ MODEKEYCOPY_BOTTOMLINE, "bottom-line" }, |
{ MODEKEYCOPY_CANCEL, "cancel" }, |
{ MODEKEYCOPY_CANCEL, "cancel" }, |
{ MODEKEYCOPY_CLEARSELECTION, "clear-selection" }, |
{ MODEKEYCOPY_CLEARSELECTION, "clear-selection" }, |
|
{ MODEKEYCOPY_COPYPIPE, "copy-pipe" }, |
{ MODEKEYCOPY_COPYLINE, "copy-line" }, |
{ MODEKEYCOPY_COPYLINE, "copy-line" }, |
{ MODEKEYCOPY_COPYENDOFLINE, "copy-end-of-line" }, |
{ MODEKEYCOPY_COPYENDOFLINE, "copy-end-of-line" }, |
{ MODEKEYCOPY_COPYSELECTION, "copy-selection" }, |
{ MODEKEYCOPY_COPYSELECTION, "copy-selection" }, |
|
|
mbind->key = ment->key; |
mbind->key = ment->key; |
mbind->mode = ment->mode; |
mbind->mode = ment->mode; |
mbind->cmd = ment->cmd; |
mbind->cmd = ment->cmd; |
|
mbind->arg = NULL; |
RB_INSERT(mode_key_tree, mtab->tree, mbind); |
RB_INSERT(mode_key_tree, mtab->tree, mbind); |
} |
} |
} |
} |
|
|
} |
} |
|
|
enum mode_key_cmd |
enum mode_key_cmd |
mode_key_lookup(struct mode_key_data *mdata, int key) |
mode_key_lookup(struct mode_key_data *mdata, int key, const char **arg) |
{ |
{ |
struct mode_key_binding *mbind, mtmp; |
struct mode_key_binding *mbind, mtmp; |
|
|
|
|
mdata->mode = 1 - mdata->mode; |
mdata->mode = 1 - mdata->mode; |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
default: |
default: |
|
if (arg != NULL) |
|
*arg = mbind->arg; |
return (mbind->cmd); |
return (mbind->cmd); |
} |
} |
} |
} |