diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-10-16 09:15:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-16 09:15:31 +0200 |
commit | a792c1f6dbbbf26946082ae8be5b4ac346a8d9bc (patch) | |
tree | 642551861db5e6c29d6b58a4c0da51c131eb9ec0 /src | |
parent | 56eda2aa17c80ba380b606f9466f288fb8162dd3 (diff) | |
parent | 1f6138702c5413bd870fb14e2237c5b42f061cd2 (diff) | |
download | rneovim-a792c1f6dbbbf26946082ae8be5b4ac346a8d9bc.tar.gz rneovim-a792c1f6dbbbf26946082ae8be5b4ac346a8d9bc.tar.bz2 rneovim-a792c1f6dbbbf26946082ae8be5b4ac346a8d9bc.zip |
Merge #7340 'menu_get: print keycodes'
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/menu.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c index 0db250d111..88d968704b 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -682,6 +682,10 @@ static dict_T *menu_get_recursive(const vimmenu_T *menu, int modes) tv_dict_add_str(dict, S_LEN("shortcut"), buf); } + if (menu->actext) { + tv_dict_add_str(dict, S_LEN("actext"), (char *)menu->actext); + } + if (menu->modes & MENU_TIP_MODE && menu->strings[MENU_INDEX_TIP]) { tv_dict_add_str(dict, S_LEN("tooltip"), (char *)menu->strings[MENU_INDEX_TIP]); @@ -695,11 +699,9 @@ static dict_T *menu_get_recursive(const vimmenu_T *menu, int modes) for (int bit = 0; bit < MENU_MODES; bit++) { if ((menu->modes & modes & (1 << bit)) != 0) { dict_T *impl = tv_dict_alloc(); - if (*menu->strings[bit] == NUL) { - tv_dict_add_str(impl, S_LEN("rhs"), (char *)"<Nop>"); - } else { - tv_dict_add_str(impl, S_LEN("rhs"), (char *)menu->strings[bit]); - } + tv_dict_add_allocated_str(impl, S_LEN("rhs"), + str2special_save((char *)menu->strings[bit], + false, false)); tv_dict_add_nr(impl, S_LEN("silent"), menu->silent[bit]); tv_dict_add_nr(impl, S_LEN("enabled"), (menu->enabled & (1 << bit)) ? 1 : 0); |