diff src/ops.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 5d67f207f7c3
children fe5afdc03bd2
line wrap: on
line diff
--- a/src/ops.c
+++ b/src/ops.c
@@ -3223,7 +3223,7 @@ do_addsub(
 	    while (ptr[col] != NUL
 		    && !vim_isdigit(ptr[col])
 		    && !(doalp && ASCII_ISALPHA(ptr[col])))
-		col += MB_PTR2LEN(ptr + col);
+		col += mb_ptr2len(ptr + col);
 
 	    while (col > 0
 		    && vim_isdigit(ptr[col - 1])
@@ -3242,7 +3242,7 @@ do_addsub(
 		&& !vim_isdigit(ptr[col])
 		&& !(doalp && ASCII_ISALPHA(ptr[col])))
 	{
-	    int mb_len = MB_PTR2LEN(ptr + col);
+	    int mb_len = mb_ptr2len(ptr + col);
 
 	    col += mb_len;
 	    length -= mb_len;