mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.0.0520: using a function pointer while the function is known
Problem: Using a function pointer instead of the actual function, which we know. Solution: Change mb_ functions to utf_ functions when already checked for Unicode. (Dominique Pelle, closes #1582)
This commit is contained in:
@@ -4732,7 +4732,7 @@ regmatch(
|
||||
break;
|
||||
}
|
||||
if (enc_utf8)
|
||||
opndc = mb_ptr2char(opnd);
|
||||
opndc = utf_ptr2char(opnd);
|
||||
if (enc_utf8 && utf_iscomposing(opndc))
|
||||
{
|
||||
/* When only a composing char is given match at any
|
||||
@@ -4741,7 +4741,7 @@ regmatch(
|
||||
for (i = 0; reginput[i] != NUL;
|
||||
i += utf_ptr2len(reginput + i))
|
||||
{
|
||||
inpc = mb_ptr2char(reginput + i);
|
||||
inpc = utf_ptr2char(reginput + i);
|
||||
if (!utf_iscomposing(inpc))
|
||||
{
|
||||
if (i > 0)
|
||||
@@ -4750,7 +4750,7 @@ regmatch(
|
||||
else if (opndc == inpc)
|
||||
{
|
||||
/* Include all following composing chars. */
|
||||
len = i + mb_ptr2len(reginput + i);
|
||||
len = i + utfc_ptr2len(reginput + i);
|
||||
status = RA_MATCH;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user