diff options
author | dundargoc <gocdundar@gmail.com> | 2023-09-29 14:58:48 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-10-03 22:02:55 +0200 |
commit | e72b546354cd90bf0cd8ee6dd045538d713009ad (patch) | |
tree | 680a28f2e9ca4ab5a3221afbffff4d64cfdef842 /src/nvim/menu.c | |
parent | 70ec8d60e0dc71c5ca06fdd83698c82b16ea474f (diff) | |
download | rneovim-e72b546354cd90bf0cd8ee6dd045538d713009ad.tar.gz rneovim-e72b546354cd90bf0cd8ee6dd045538d713009ad.tar.bz2 rneovim-e72b546354cd90bf0cd8ee6dd045538d713009ad.zip |
refactor: the long goodbye
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
Diffstat (limited to 'src/nvim/menu.c')
-rw-r--r-- | src/nvim/menu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c index 9a403c4192..4a72464527 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -366,7 +366,7 @@ static int add_menu_path(const char *const menu_path, vimmenu_T *menuarg, const menu->en_name = NULL; menu->en_dname = NULL; } - menu->priority = pri_tab[pri_idx]; + menu->priority = (int)pri_tab[pri_idx]; menu->parent = parent; // Add after menu that has lower priority. @@ -659,7 +659,7 @@ static dict_T *menu_get_recursive(const vimmenu_T *menu, int modes) dict_T *dict = tv_dict_alloc(); tv_dict_add_str(dict, S_LEN("name"), menu->dname); - tv_dict_add_nr(dict, S_LEN("priority"), (int)menu->priority); + tv_dict_add_nr(dict, S_LEN("priority"), menu->priority); tv_dict_add_nr(dict, S_LEN("hidden"), menu_is_hidden(menu->dname)); if (menu->mnemonic) { @@ -1847,7 +1847,7 @@ static void menuitem_getinfo(const char *menu_name, const vimmenu_T *menu, int m if (menu->actext != NULL) { tv_dict_add_str(dict, S_LEN("accel"), menu->actext); } - tv_dict_add_nr(dict, S_LEN("priority"), (int)menu->priority); + tv_dict_add_nr(dict, S_LEN("priority"), menu->priority); tv_dict_add_str(dict, S_LEN("modes"), get_menu_mode_str(menu->modes)); char buf[NUMBUFLEN]; |