diff options
author | Felipe Morales <hel.sheep@gmail.com> | 2014-11-21 13:25:54 -0300 |
---|---|---|
committer | Felipe Morales <hel.sheep@gmail.com> | 2014-11-27 19:40:51 -0300 |
commit | 9ab44e74abb7553ad39c13621e0904680e61287d (patch) | |
tree | ea2da4ecc738e3dd2fba732d7730e3319f30a647 /src | |
parent | c82eb31a5d22353b3a31e247448a44b19a590c05 (diff) | |
download | rneovim-9ab44e74abb7553ad39c13621e0904680e61287d.tar.gz rneovim-9ab44e74abb7553ad39c13621e0904680e61287d.tar.bz2 rneovim-9ab44e74abb7553ad39c13621e0904680e61287d.zip |
vim-patch:7.4.478: Use character lenght for 'showbreak'
vim-patch:7.4.478
Problem: Using byte length instead of character length for
'showbreak'.
Solution: Compute the character length. (Marco Hinz)
https://code.google.com/p/vim/source/detail?r=v7-4-478
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/charset.c | 7 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c index 3e37cbdafd..bbe80a519c 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -1058,8 +1058,11 @@ int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *he if (col >= (colnr_T)wp->w_width) { col -= wp->w_width; numberextra = wp->w_width - (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/nvim/version.c b/src/nvim/version.c index 28404c902c..f73e5c8cae 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -188,7 +188,7 @@ static int included_patches[] = { //481, //480, //479, - //478, + 478, //477, //476, //475, |