|
|
22c937 |
To: vim_dev@googlegroups.com
|
|
|
22c937 |
Subject: Patch 7.4.478
|
|
|
22c937 |
Fcc: outbox
|
|
|
22c937 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
22c937 |
Mime-Version: 1.0
|
|
|
22c937 |
Content-Type: text/plain; charset=UTF-8
|
|
|
22c937 |
Content-Transfer-Encoding: 8bit
|
|
|
22c937 |
------------
|
|
|
22c937 |
|
|
|
22c937 |
Patch 7.4.478
|
|
|
22c937 |
Problem: Using byte length instead of character length for 'showbreak'.
|
|
|
22c937 |
Solution: Compute the character length. (Marco Hinz)
|
|
|
22c937 |
Files: src/charset.c
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.477/src/charset.c 2014-10-10 15:34:29.657092994 +0200
|
|
|
22c937 |
--- src/charset.c 2014-10-15 21:24:05.578082450 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1184,1191 ****
|
|
|
22c937 |
{
|
|
|
22c937 |
col -= W_WIDTH(wp);
|
|
|
22c937 |
numberextra = W_WIDTH(wp) - (numberextra - win_col_off2(wp));
|
|
|
22c937 |
! if (*p_sbr != NUL && col >= (colnr_T)STRLEN(p_sbr))
|
|
|
22c937 |
! col -= (colnr_T)STRLEN(p_sbr);
|
|
|
22c937 |
if (numberextra > 0)
|
|
|
22c937 |
col = col % numberextra;
|
|
|
22c937 |
}
|
|
|
22c937 |
--- 1184,1195 ----
|
|
|
22c937 |
{
|
|
|
22c937 |
col -= W_WIDTH(wp);
|
|
|
22c937 |
numberextra = W_WIDTH(wp) - (numberextra - win_col_off2(wp));
|
|
|
22c937 |
! if (*p_sbr != NUL)
|
|
|
22c937 |
! {
|
|
|
22c937 |
! colnr_T sbrlen = (colnr_T)MB_CHARLEN(p_sbr);
|
|
|
22c937 |
! if (col >= sbrlen)
|
|
|
22c937 |
! col -= sbrlen;
|
|
|
22c937 |
! }
|
|
|
22c937 |
if (numberextra > 0)
|
|
|
22c937 |
col = col % numberextra;
|
|
|
22c937 |
}
|
|
|
22c937 |
*** ../vim-7.4.477/src/version.c 2014-10-15 12:56:44.006015955 +0200
|
|
|
22c937 |
--- src/version.c 2014-10-15 21:19:10.414081805 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 743,744 ****
|
|
|
22c937 |
--- 743,746 ----
|
|
|
22c937 |
{ /* Add new patch number below this line */
|
|
|
22c937 |
+ /**/
|
|
|
22c937 |
+ 478,
|
|
|
22c937 |
/**/
|
|
|
22c937 |
|
|
|
22c937 |
--
|
|
|
22c937 |
There is a fine line between courage and foolishness.
|
|
|
22c937 |
Unfortunately, it's not a fence.
|
|
|
22c937 |
|
|
|
22c937 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
22c937 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
22c937 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
22c937 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|