Mercurial > vim
diff src/message.c @ 11269:121d29004998 v8.0.0520
patch 8.0.0520: using a function pointer while the function is known
commit https://github.com/vim/vim/commit/ace95989ed81929a84e205b26d0972cb9d6b4b19
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 29 17:30:27 2017 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 29 Mar 2017 17:45:06 +0200 |
parents | f4d1fad4ac00 |
children | 7ad79766365a |
line wrap: on
line diff
--- 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)