mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
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 #8305)
This commit is contained in:
@@ -4817,14 +4817,14 @@ set_chars_option(win_T *wp, char_u **varp)
|
||||
{
|
||||
tab = lcstab;
|
||||
CLEAR_FIELD(lcs_chars);
|
||||
entries = sizeof(lcstab) / sizeof(struct charstab);
|
||||
entries = ARRAY_LENGTH(lcstab);
|
||||
if (varp == &wp->w_p_lcs && wp->w_p_lcs[0] == NUL)
|
||||
varp = &p_lcs;
|
||||
}
|
||||
else
|
||||
{
|
||||
tab = filltab;
|
||||
entries = sizeof(filltab) / sizeof(struct charstab);
|
||||
entries = ARRAY_LENGTH(filltab);
|
||||
}
|
||||
|
||||
// first round: check for valid value, second round: assign values
|
||||
|
Reference in New Issue
Block a user