summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-10-15 21:26:40 +0200
committerBram Moolenaar <Bram@vim.org>2014-10-15 21:26:40 +0200
commit1c85210d6d0e426b6eb68972f12252804d509dd8 (patch)
tree7047b7ee8fee1df226f6f72e93f1bcbd1b355caa /src
parente962c6795be76884f3683d93487fb59d3dae9b0a (diff)
downloadvim-1c85210d6d0e426b6eb68972f12252804d509dd8.zip
updated for version 7.4.478
Problem: Using byte length instead of character length for 'showbreak'. Solution: Compute the character length. (Marco Hinz)
Diffstat (limited to 'src')
-rw-r--r--src/charset.c8
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/charset.c b/src/charset.c
index 006caa2a5..918f9a514 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1184,8 +1184,12 @@ win_lbr_chartabsize(wp, line, s, col, headp)
{
col -= W_WIDTH(wp);
numberextra = W_WIDTH(wp) - (numberextra - win_col_off2(wp));
- if (*p_sbr != NUL && col >= (colnr_T)STRLEN(p_sbr))
- col -= (colnr_T)STRLEN(p_sbr);
+ if (*p_sbr != NUL)
+ {
+ colnr_T sbrlen = (colnr_T)MB_CHARLEN(p_sbr);
+ if (col >= sbrlen)
+ col -= sbrlen;
+ }
if (numberextra > 0)
col = col % numberextra;
}
diff --git a/src/version.c b/src/version.c
index d233c24e9..fed16aa17 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 478,
+/**/
477,
/**/
476,