diff options
author | Dominique Pelle <dominique.pelle@gmail.com> | 2021-05-18 21:46:31 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-05-18 21:46:31 +0200 |
commit | 4781d6fd8670af415c3b78f00d70036af85bd286 (patch) | |
tree | 48004675da2c28e5d478308d6a0da87da4d1ed67 /src/charset.c | |
parent | 796139ae3ac89e27ee96dce3c7fdb87d8c839f53 (diff) |
patch 8.2.2871: unnessary VIM_ISDIGIT() calls, badly indented codev8.2.2871
Problem: Unnessary VIM_ISDIGIT() calls, badly indented code.
Solution: Call skipdigits() on the next character. Improve indenting.
(Dominique Pellé, closes #8227)
Diffstat (limited to 'src/charset.c')
-rw-r--r-- | src/charset.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/charset.c b/src/charset.c index 10aa2e8e52..fcaeedf757 100644 --- a/src/charset.c +++ b/src/charset.c @@ -169,8 +169,7 @@ buf_init_chartab( } if (VIM_ISDIGIT(*p)) c = getdigits(&p); - else - if (has_mbyte) + else if (has_mbyte) c = mb_ptr2char_adv(&p); else c = *p++; @@ -180,8 +179,7 @@ buf_init_chartab( ++p; if (VIM_ISDIGIT(*p)) c2 = getdigits(&p); - else - if (has_mbyte) + else if (has_mbyte) c2 = mb_ptr2char_adv(&p); else c2 = *p++; |