summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorK.Takata <kentkt@csc.jp>2021-06-02 13:28:16 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-02 13:28:16 +0200
commiteeec2548785b2dd245a31ab25d7bde0f88ea1a6d (patch)
tree533236c436888fd7a072c4d94a75279158f9c8a5 /src/screen.c
parentb54abeeafb074248597878a874fed9a66b114c06 (diff)
downloadvim-git-eeec2548785b2dd245a31ab25d7bde0f88ea1a6d.tar.gz
patch 8.2.2922: computing array length is done in various waysv8.2.2922
Problem: Computing array length is done in various ways. Solution: Use ARRAY_LENGTH everywhere. (Ken Takata, closes #8305)
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/screen.c b/src/screen.c
index 9d5d4df98..7c27e2ca4 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -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