aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/menu.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-12-16 22:14:28 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-12-19 11:43:21 +0100
commit7f6b775b45de5011ff1c44e63e57551566d80704 (patch)
tree54eab8482051d2d1a958fcf9f6c9bcbb02827717 /src/nvim/menu.c
parent693aea0e9e1032aee85d56c1a3f33e0811dbdc18 (diff)
downloadrneovim-7f6b775b45de5011ff1c44e63e57551566d80704.tar.gz
rneovim-7f6b775b45de5011ff1c44e63e57551566d80704.tar.bz2
rneovim-7f6b775b45de5011ff1c44e63e57551566d80704.zip
refactor: use `bool` to represent boolean values
Diffstat (limited to 'src/nvim/menu.c')
-rw-r--r--src/nvim/menu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c
index bc850d8961..68a8c9f873 100644
--- a/src/nvim/menu.c
+++ b/src/nvim/menu.c
@@ -968,7 +968,7 @@ char *get_menu_name(expand_T *xp, int idx)
{
static vimmenu_T *menu = NULL;
char *str;
- static int should_advance = false;
+ static bool should_advance = false;
if (idx == 0) { // first call: start at first item
menu = expand_menu;
@@ -1334,9 +1334,9 @@ bool menu_is_toolbar(const char *const name)
return strncmp(name, "ToolBar", 7) == 0;
}
-/// Return true if the name is a menu separator identifier: Starts and ends
-/// with '-'
-int menu_is_separator(char *name)
+/// @return true if the name is a menu separator identifier: Starts and ends
+/// with '-'
+bool menu_is_separator(char *name)
{
return name[0] == '-' && name[strlen(name) - 1] == '-';
}
@@ -1344,7 +1344,7 @@ int menu_is_separator(char *name)
/// True if a popup menu or starts with \ref MNU_HIDDEN_CHAR
///
/// @return true if the menu is hidden
-static int menu_is_hidden(char *name)
+static bool menu_is_hidden(char *name)
{
return (name[0] == MNU_HIDDEN_CHAR)
|| (menu_is_popup(name) && name[5] != NUL);