diff options
author | KillTheMule <KillTheMule@users.noreply.github.com> | 2017-10-02 14:55:19 +0200 |
---|---|---|
committer | KillTheMule <KillTheMule@users.noreply.github.com> | 2017-10-02 21:49:50 +0200 |
commit | 41f624a85b95d54ce038637cbe53530ad1b99f53 (patch) | |
tree | 4cd71473ff38e2779863929abb64bd5dee19919b /src | |
parent | 9fb8b47ad845b0dc95da64705276c9f163e97f6c (diff) | |
download | rneovim-41f624a85b95d54ce038637cbe53530ad1b99f53.tar.gz rneovim-41f624a85b95d54ce038637cbe53530ad1b99f53.tar.bz2 rneovim-41f624a85b95d54ce038637cbe53530ad1b99f53.zip |
Deal with NOP, add actext to output
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/menu.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c index 69700e34fd..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,13 +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_allocated_str(impl, S_LEN("rhs"), - str2special_save((char *)menu->strings[bit], - false, false)); - } + 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); |