| File src/engine/keys.c changed (mode: 100644) (index cbd2e60de..efecf7755) |
| ... |
... |
execute_keys_inner(const wchar_t keys[], keys_info_t *keys_info, int no_remap, |
| 259 |
259 |
return 0; |
return 0; |
| 260 |
260 |
keys = get_count(keys, &key_info.count); |
keys = get_count(keys, &key_info.count); |
| 261 |
261 |
key_info.count = combine_counts(key_info.count, prev_count); |
key_info.count = combine_counts(key_info.count, prev_count); |
|
262 |
|
key_info.multi = L'\0'; |
| 262 |
263 |
root = keys_info->selector ? &selectors_root[*mode] : &user_cmds_root[*mode]; |
root = keys_info->selector ? &selectors_root[*mode] : &user_cmds_root[*mode]; |
| 263 |
264 |
|
|
| 264 |
265 |
if(!no_remap) |
if(!no_remap) |
| |
| ... |
... |
remove_user_keys(const wchar_t *keys, int mode) |
| 665 |
666 |
|
|
| 666 |
667 |
do |
do |
| 667 |
668 |
{ |
{ |
| 668 |
|
key_chunk_t *parent = curr->parent; |
|
|
669 |
|
key_chunk_t *const parent = curr->parent; |
| 669 |
670 |
if(curr->prev != NULL) |
if(curr->prev != NULL) |
| 670 |
671 |
curr->prev->next = curr->next; |
curr->prev->next = curr->next; |
| 671 |
672 |
else |
else |
| |
| ... |
... |
remove_user_keys(const wchar_t *keys, int mode) |
| 685 |
686 |
static key_chunk_t * |
static key_chunk_t * |
| 686 |
687 |
find_user_keys(const wchar_t *keys, int mode) |
find_user_keys(const wchar_t *keys, int mode) |
| 687 |
688 |
{ |
{ |
| 688 |
|
key_chunk_t *curr = &user_cmds_root[mode], *p; |
|
|
689 |
|
key_chunk_t *curr = &user_cmds_root[mode]; |
| 689 |
690 |
while(*keys != L'\0') |
while(*keys != L'\0') |
| 690 |
691 |
{ |
{ |
| 691 |
|
p = curr->child; |
|
|
692 |
|
key_chunk_t *p = curr->child; |
| 692 |
693 |
while(p != NULL && p->key < *keys) |
while(p != NULL && p->key < *keys) |
| 693 |
694 |
p = p->next; |
p = p->next; |
| 694 |
695 |
if(p == NULL || p->key != *keys) |
if(p == NULL || p->key != *keys) |
| |
| ... |
... |
find_user_keys(const wchar_t *keys, int mode) |
| 696 |
697 |
curr = p; |
curr = p; |
| 697 |
698 |
keys++; |
keys++; |
| 698 |
699 |
} |
} |
| 699 |
|
|
|
| 700 |
|
if(curr->conf.type != USER_CMD) |
|
| 701 |
|
return NULL; |
|
| 702 |
|
return curr; |
|
|
700 |
|
return (curr->conf.type == USER_CMD) ? curr : NULL; |
| 703 |
701 |
} |
} |
| 704 |
702 |
|
|
| 705 |
703 |
TSTATIC key_conf_t * |
TSTATIC key_conf_t * |