vim-patch:8.2.2922: computing array length is done in various ways

Problem:    Computing array length is done in various ways.
Solution:   Use ARRAY_LENGTH everywhere. (Ken Takata, closes vim/vim#8305)
eeec254878
This commit is contained in:
VVKot 2021-11-21 07:24:07 +00:00
parent 120a881630
commit ddc401a91c
3 changed files with 2 additions and 4 deletions

View File

@ -986,8 +986,7 @@ static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T
#define PRT_PS_DEFAULT_DPI (72) // Default user space resolution #define PRT_PS_DEFAULT_DPI (72) // Default user space resolution
#define PRT_PS_DEFAULT_FONTSIZE (10) #define PRT_PS_DEFAULT_FONTSIZE (10)
#define PRT_MEDIASIZE_LEN (sizeof(prt_mediasize) / \ #define PRT_MEDIASIZE_LEN ARRAY_SIZE(prt_mediasize)
sizeof(struct prt_mediasize_S))
static struct prt_mediasize_S prt_mediasize[] = static struct prt_mediasize_S prt_mediasize[] =
{ {

View File

@ -677,7 +677,7 @@ void getout(int exitval)
if (did_emsg) { if (did_emsg) {
// give the user a chance to read the (error) message // give the user a chance to read the (error) message
no_wait_return = FALSE; no_wait_return = FALSE;
wait_return(FALSE); // wait_return(FALSE);
} }
// Position the cursor again, the autocommands may have moved it // Position the cursor again, the autocommands may have moved it

View File

@ -573,7 +573,6 @@ void free_all_mem(void)
return; return;
} }
entered_free_all_mem = true; entered_free_all_mem = true;
// Don't want to trigger autocommands from here on. // Don't want to trigger autocommands from here on.
block_autocmds(); block_autocmds();