summaryrefslogtreecommitdiffstats
path: root/src/message.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-29 17:30:27 +0200
committerBram Moolenaar <Bram@vim.org>2017-03-29 17:30:27 +0200
commitace95989ed81929a84e205b26d0972cb9d6b4b19 (patch)
treee6d6813abe2e2671741c7ca27864d85969ec601b /src/message.c
parent0c078fc7db2902d4ccba04506db082ddbef45a8c (diff)
patch 8.0.0520: using a function pointer while the function is knownv8.0.0520
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)
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/message.c b/src/message.c
index a4dd746d0a..a9a66698d2 100644
--- a/src/message.c
+++ b/src/message.c
@@ -315,7 +315,7 @@ trunc_string(
for (;;)
{
do
- half = half - (*mb_head_off)(s, s + half - 1) - 1;
+ half = half - utf_head_off(s, s + half - 1) - 1;
while (half > 0 && utf_iscomposing(utf_ptr2char(s + half)));
n = ptr2cells(s + half);
if (len + n > room || half == 0)