aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/menu.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-05-25 20:31:14 +0200
committerGitHub <noreply@github.com>2022-05-25 12:31:14 -0600
commit9fec6dc9a25b5cf9c9a444ac2bd0728e8af3229e (patch)
tree83e044109d61242150b8c98897e179416025f576 /src/nvim/menu.c
parent8c4e62351f67dd6a44f67f3a2b6f3a3551acf475 (diff)
downloadrneovim-9fec6dc9a25b5cf9c9a444ac2bd0728e8af3229e.tar.gz
rneovim-9fec6dc9a25b5cf9c9a444ac2bd0728e8af3229e.tar.bz2
rneovim-9fec6dc9a25b5cf9c9a444ac2bd0728e8af3229e.zip
refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)
Diffstat (limited to 'src/nvim/menu.c')
-rw-r--r--src/nvim/menu.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c
index c1ce2eefe3..01a44224e8 100644
--- a/src/nvim/menu.c
+++ b/src/nvim/menu.c
@@ -31,12 +31,10 @@
#define MENUDEPTH 10 // maximum depth of menus
-
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "menu.c.generated.h"
#endif
-
/// The character for each menu mode
static char menu_mode_chars[] = { 'n', 'v', 's', 'o', 'i', 'c', 't' };
@@ -98,7 +96,6 @@ void ex_menu(exarg_T *eap)
break;
}
-
// Locate an optional "icon=filename" argument
// TODO(nvim): Currently this is only parsed. Should expose it to UIs.
if (STRNCMP(arg, "icon=", 5) == 0) {
@@ -162,7 +159,6 @@ void ex_menu(exarg_T *eap)
return;
}
-
menu_path = arg;
if (*menu_path == '.') {
semsg(_(e_invarg2), menu_path);
@@ -268,7 +264,6 @@ theend:
;
}
-
/// Add the menu with the given name to the menu hierarchy
///
/// @param[out] menuarg menu entry
@@ -398,7 +393,6 @@ static int add_menu_path(const char *const menu_path, vimmenu_T *menuarg, const
}
}
-
menup = &menu->children;
parent = menu;
name = next_name;
@@ -543,7 +537,6 @@ static int menu_enable_recurse(vimmenu_T *menu, char *name, int modes, int enabl
return FAIL;
}
-
return OK;
}
@@ -615,7 +608,6 @@ static int remove_menu(vimmenu_T **menup, char *name, int modes, bool silent)
return FAIL;
}
-
// Recalculate modes for menu based on the new updated children
menu->modes &= ~modes;
child = menu->children;
@@ -645,7 +637,6 @@ static void free_menu(vimmenu_T **menup)
menu = *menup;
-
// Don't change *menup until after calling gui_mch_destroy_menu(). The
// MacOS code needs the original structure to properly delete the menu.
*menup = menu->next;
@@ -749,7 +740,6 @@ static dict_T *menu_get_recursive(const vimmenu_T *menu, int modes)
return dict;
}
-
/// Export menus matching path \p path_name
///
/// @param path_name
@@ -776,7 +766,6 @@ bool menu_get(char *const path_name, int modes, list_T *list)
return true;
}
-
/// Find menu matching `name` and `modes`.
///
/// @param menu top menu to start looking from
@@ -913,7 +902,6 @@ static void show_menus_recursive(vimmenu_T *menu, int modes, int depth)
}
}
-
/*
* Used when expanding menu names.
*/
@@ -937,7 +925,6 @@ char *set_context_in_menu_cmd(expand_T *xp, const char *cmd, char *arg, bool for
xp->xp_context = EXPAND_UNSUCCESSFUL;
-
// Check for priority numbers, enable and disable
for (p = arg; *p; ++p) {
if (!ascii_isdigit(*p) && *p != '.') {
@@ -1146,7 +1133,6 @@ char *get_menu_names(expand_T *xp, int idx)
return str;
}
-
/// Skip over this element of the menu path and return the start of the next
/// element. Any \ and ^Vs are removed from the current element.
///
@@ -1197,7 +1183,6 @@ static bool menu_namecmp(const char *const name, const char *const mname)
&& (mname[i] == NUL || mname[i] == TAB);
}
-
/// Returns the \ref MENU_MODES specified by menu command `cmd`.
/// (eg :menu! returns MENU_CMDLINE_MODE | MENU_INSERT_MODE)
///
@@ -1281,7 +1266,6 @@ static char *popup_mode_name(char *name, int idx)
return p;
}
-
/// Duplicate the menu item text and then process to see if a mnemonic key
/// and/or accelerator text has been identified.
///
@@ -1346,7 +1330,6 @@ bool menu_is_popup(const char *const name)
return STRNCMP(name, "PopUp", 5) == 0;
}
-
// Return true if "name" is a toolbar menu name.
bool menu_is_toolbar(const char *const name)
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
@@ -1363,7 +1346,6 @@ int menu_is_separator(char *name)
return name[0] == '-' && name[STRLEN(name) - 1] == '-';
}
-
/// True if a popup menu or starts with \ref MNU_HIDDEN_CHAR
///
/// @return true if the menu is hidden