diff options
author | K.Takata <kentkt@csc.jp> | 2021-06-02 13:28:16 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-02 13:28:16 +0200 |
commit | eeec2548785b2dd245a31ab25d7bde0f88ea1a6d (patch) | |
tree | 533236c436888fd7a072c4d94a75279158f9c8a5 /src/screen.c | |
parent | b54abeeafb074248597878a874fed9a66b114c06 (diff) |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/screen.c b/src/screen.c index 9d5d4df98c..7c27e2ca42 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 |