Mercurial > vim
comparison src/eval.c @ 18251:c8a53c0daeed v8.1.2120
patch 8.1.2120: some MB_ macros are more complicated than necessary
Commit: https://github.com/vim/vim/commit/1614a14901558ca091329315d14a7d5e1b53aa47
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 6 22:00:13 2019 +0200
patch 8.1.2120: some MB_ macros are more complicated than necessary
Problem: Some MB_ macros are more complicated than necessary. (Dominique
Pelle)
Solution: Simplify the macros. Expand inline.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 06 Oct 2019 22:15:04 +0200 |
parents | 6c3a8312486d |
children | 506bf60a30a0 |
comparison
equal
deleted
inserted
replaced
18250:f1d9d3f76c98 | 18251:c8a53c0daeed |
---|---|
6444 if (regmatch.startp[0] == regmatch.endp[0]) | 6444 if (regmatch.startp[0] == regmatch.endp[0]) |
6445 { | 6445 { |
6446 if (zero_width == regmatch.startp[0]) | 6446 if (zero_width == regmatch.startp[0]) |
6447 { | 6447 { |
6448 /* avoid getting stuck on a match with an empty string */ | 6448 /* avoid getting stuck on a match with an empty string */ |
6449 i = MB_PTR2LEN(tail); | 6449 i = mb_ptr2len(tail); |
6450 mch_memmove((char_u *)ga.ga_data + ga.ga_len, tail, | 6450 mch_memmove((char_u *)ga.ga_data + ga.ga_len, tail, |
6451 (size_t)i); | 6451 (size_t)i); |
6452 ga.ga_len += i; | 6452 ga.ga_len += i; |
6453 tail += i; | 6453 tail += i; |
6454 continue; | 6454 continue; |