aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mbyte.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-11-14 13:39:14 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2021-11-14 17:08:50 +0100
commit1450a6f7534147e3d7252594cf06e2a1cc14b79b (patch)
tree1971f1f0f146e16cc8d0f52c97e6b9a0c21f27c6 /src/nvim/mbyte.c
parent54ff21a15303e1c7dbfde4895c3444daad6df16a (diff)
downloadrneovim-1450a6f7534147e3d7252594cf06e2a1cc14b79b.tar.gz
rneovim-1450a6f7534147e3d7252594cf06e2a1cc14b79b.tar.bz2
rneovim-1450a6f7534147e3d7252594cf06e2a1cc14b79b.zip
refactor(macroman): get rid of MB_COPY_CHAR macro
clean up docs for MB_PTR_ADV and MB_PTR_BACK
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r--src/nvim/mbyte.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c
index 3916117785..12460646ed 100644
--- a/src/nvim/mbyte.c
+++ b/src/nvim/mbyte.c
@@ -791,9 +791,6 @@ int utfc_ptr2char(const char_u *p, int *pcc)
*/
int utfc_ptr2char_len(const char_u *p, int *pcc, int maxlen)
{
-#define IS_COMPOSING(s1, s2, s3) \
- (i == 0 ? utf_composinglike((s1), (s2)) : utf_iscomposing((s3)))
-
assert(maxlen > 0);
int i = 0;
@@ -809,7 +806,7 @@ int utfc_ptr2char_len(const char_u *p, int *pcc, int maxlen)
int len_cc = utf_ptr2len_len(p + len, maxlen - len);
safe = len_cc > 1 && len_cc <= maxlen - len;
if (!safe || (pcc[i] = utf_ptr2char(p + len)) < 0x80
- || !IS_COMPOSING(p, p + len, pcc[i])) {
+ || !(i == 0 ? utf_composinglike(p, p+len) : utf_iscomposing(pcc[i]))) {
break;
}
len += len_cc;