Patch 8.0.0991
Problem: Using wrong character conversion for DBCS.
Solution: Use utf_char2bytes instead of mb_char2bytes. (Yasuhiro Matsumoto,
closes #2012)
Files: src/terminal.c
*** ../vim-8.0.0990/src/terminal.c 2017-08-23 23:10:15.861895854 +0200
--- src/terminal.c 2017-08-23 23:34:31.108236139 +0200
***************
*** 945,951 ****
width = 1;
vim_memset(p + pos.col, 0, sizeof(cellattr_T));
if (ga_grow(&ga, 1) == OK)
! ga.ga_len += mb_char2bytes(' ',
(char_u *)ga.ga_data + ga.ga_len);
}
else
--- 945,951 ----
width = 1;
vim_memset(p + pos.col, 0, sizeof(cellattr_T));
if (ga_grow(&ga, 1) == OK)
! ga.ga_len += utf_char2bytes(' ',
(char_u *)ga.ga_data + ga.ga_len);
}
else
***************
*** 1943,1949 ****
break;
}
for (i = 0; (c = cells[col].chars[i]) > 0 || i == 0; ++i)
! ga.ga_len += mb_char2bytes(c == NUL ? ' ' : c,
(char_u *)ga.ga_data + ga.ga_len);
p[col].width = cells[col].width;
p[col].attrs = cells[col].attrs;
--- 1943,1949 ----
break;
}
for (i = 0; (c = cells[col].chars[i]) > 0 || i == 0; ++i)
! ga.ga_len += utf_char2bytes(c == NUL ? ' ' : c,
(char_u *)ga.ga_data + ga.ga_len);
p[col].width = cells[col].width;
p[col].attrs = cells[col].attrs;
*** ../vim-8.0.0990/src/version.c 2017-08-23 23:10:15.861895854 +0200
--- src/version.c 2017-08-23 23:35:38.451791912 +0200
***************
*** 771,772 ****
--- 771,774 ----
{ /* Add new patch number below this line */
+ /**/
+ 991,
/**/
--
Everybody wants to go to heaven, but nobody wants to die.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.