aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/menu.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-05-06 23:59:43 +0200
committerGitHub <noreply@github.com>2019-05-06 23:59:43 +0200
commit5a714c53f293fbbb168e4131b81ec280280ff240 (patch)
treeda09d1dc47de85bea9afa60c5e482ebf1f7e4f93 /src/nvim/menu.c
parentd83a7dc68732414c013bdf7458b16b95885c6ebd (diff)
parent91547a80b63cf392236657cc9c5be093d142be3f (diff)
downloadrneovim-5a714c53f293fbbb168e4131b81ec280280ff240.tar.gz
rneovim-5a714c53f293fbbb168e4131b81ec280280ff240.tar.bz2
rneovim-5a714c53f293fbbb168e4131b81ec280280ff240.zip
Merge #9977 from justinmk/pvs
Diffstat (limited to 'src/nvim/menu.c')
-rw-r--r--src/nvim/menu.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c
index 523bb20738..472481bb30 100644
--- a/src/nvim/menu.c
+++ b/src/nvim/menu.c
@@ -774,15 +774,12 @@ static vimmenu_T *find_menu(vimmenu_T *menu, char_u *name, int modes)
if (menu_name_equal(name, menu)) {
// Found menu
if (*p != NUL && menu->children == NULL) {
- if (*p != NUL) {
EMSG(_(e_notsubmenu));
return NULL;
- } else if ((menu->modes & modes) == 0x0) {
- EMSG(_(e_othermode));
- return NULL;
- }
- }
- if (*p == NUL) { // found a full match
+ } else if ((menu->modes & modes) == 0x0) {
+ EMSG(_(e_othermode));
+ return NULL;
+ } else if (*p == NUL) { // found a full match
return menu;
}
break;