|
Karsten Hopp |
1ebd6d |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
1ebd6d |
Subject: Patch 7.4.665
|
|
Karsten Hopp |
1ebd6d |
Fcc: outbox
|
|
Karsten Hopp |
1ebd6d |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
1ebd6d |
Mime-Version: 1.0
|
|
Karsten Hopp |
1ebd6d |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
1ebd6d |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
1ebd6d |
------------
|
|
Karsten Hopp |
1ebd6d |
|
|
Karsten Hopp |
1ebd6d |
Patch 7.4.665
|
|
Karsten Hopp |
1ebd6d |
Problem: 'linebreak' does not work properly with multi-byte characters.
|
|
Karsten Hopp |
1ebd6d |
Solution: Compute the pointer offset with mb_head_off(). (Yasuhiro
|
|
Karsten Hopp |
1ebd6d |
Matsumoto)
|
|
Karsten Hopp |
1ebd6d |
Files: src/screen.c
|
|
Karsten Hopp |
1ebd6d |
|
|
Karsten Hopp |
1ebd6d |
|
|
Karsten Hopp |
1ebd6d |
*** ../vim-7.4.664/src/screen.c 2015-03-20 15:42:07.200377381 +0100
|
|
Karsten Hopp |
1ebd6d |
--- src/screen.c 2015-03-20 15:51:46.173856852 +0100
|
|
Karsten Hopp |
1ebd6d |
***************
|
|
Karsten Hopp |
1ebd6d |
*** 4484,4494 ****
|
|
Karsten Hopp |
1ebd6d |
*/
|
|
Karsten Hopp |
1ebd6d |
if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr))
|
|
Karsten Hopp |
1ebd6d |
{
|
|
Karsten Hopp |
1ebd6d |
char_u *p = ptr - (
|
|
Karsten Hopp |
1ebd6d |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
1ebd6d |
! has_mbyte ? mb_l :
|
|
Karsten Hopp |
1ebd6d |
# endif
|
|
Karsten Hopp |
1ebd6d |
1);
|
|
Karsten Hopp |
1ebd6d |
/* TODO: is passing p for start of the line OK? */
|
|
Karsten Hopp |
1ebd6d |
n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol,
|
|
Karsten Hopp |
1ebd6d |
NULL) - 1;
|
|
Karsten Hopp |
1ebd6d |
--- 4484,4498 ----
|
|
Karsten Hopp |
1ebd6d |
*/
|
|
Karsten Hopp |
1ebd6d |
if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr))
|
|
Karsten Hopp |
1ebd6d |
{
|
|
Karsten Hopp |
1ebd6d |
+ # ifdef FEAT_MBYTE
|
|
Karsten Hopp |
1ebd6d |
+ int off = has_mbyte ? (*mb_head_off)(line, ptr - 1) : 0;
|
|
Karsten Hopp |
1ebd6d |
+ # endif
|
|
Karsten Hopp |
1ebd6d |
char_u *p = ptr - (
|
|
Karsten Hopp |
1ebd6d |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
1ebd6d |
! off +
|
|
Karsten Hopp |
1ebd6d |
# endif
|
|
Karsten Hopp |
1ebd6d |
1);
|
|
Karsten Hopp |
1ebd6d |
+
|
|
Karsten Hopp |
1ebd6d |
/* TODO: is passing p for start of the line OK? */
|
|
Karsten Hopp |
1ebd6d |
n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol,
|
|
Karsten Hopp |
1ebd6d |
NULL) - 1;
|
|
Karsten Hopp |
1ebd6d |
***************
|
|
Karsten Hopp |
1ebd6d |
*** 4496,4502 ****
|
|
Karsten Hopp |
1ebd6d |
--- 4500,4510 ----
|
|
Karsten Hopp |
1ebd6d |
n_extra = (int)wp->w_buffer->b_p_ts
|
|
Karsten Hopp |
1ebd6d |
- vcol % (int)wp->w_buffer->b_p_ts - 1;
|
|
Karsten Hopp |
1ebd6d |
|
|
Karsten Hopp |
1ebd6d |
+ # ifdef FEAT_MBYTE
|
|
Karsten Hopp |
1ebd6d |
+ c_extra = off > 0 ? MB_FILLER_CHAR : ' ';
|
|
Karsten Hopp |
1ebd6d |
+ # else
|
|
Karsten Hopp |
1ebd6d |
c_extra = ' ';
|
|
Karsten Hopp |
1ebd6d |
+ # endif
|
|
Karsten Hopp |
1ebd6d |
if (vim_iswhite(c))
|
|
Karsten Hopp |
1ebd6d |
{
|
|
Karsten Hopp |
1ebd6d |
#ifdef FEAT_CONCEAL
|
|
Karsten Hopp |
1ebd6d |
*** ../vim-7.4.664/src/version.c 2015-03-20 15:42:07.200377381 +0100
|
|
Karsten Hopp |
1ebd6d |
--- src/version.c 2015-03-20 15:47:29.472744102 +0100
|
|
Karsten Hopp |
1ebd6d |
***************
|
|
Karsten Hopp |
1ebd6d |
*** 743,744 ****
|
|
Karsten Hopp |
1ebd6d |
--- 743,746 ----
|
|
Karsten Hopp |
1ebd6d |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
1ebd6d |
+ /**/
|
|
Karsten Hopp |
1ebd6d |
+ 665,
|
|
Karsten Hopp |
1ebd6d |
/**/
|
|
Karsten Hopp |
1ebd6d |
|
|
Karsten Hopp |
1ebd6d |
--
|
|
Karsten Hopp |
1ebd6d |
ARTHUR: Be quiet!
|
|
Karsten Hopp |
1ebd6d |
DENNIS: Well you can't expect to wield supreme executive power just 'cause
|
|
Karsten Hopp |
1ebd6d |
some watery tart threw a sword at you!
|
|
Karsten Hopp |
1ebd6d |
ARTHUR: Shut up!
|
|
Karsten Hopp |
1ebd6d |
DENNIS: I mean, if I went around sayin' I was an empereror just because some
|
|
Karsten Hopp |
1ebd6d |
moistened bint had lobbed a scimitar at me they'd put me away!
|
|
Karsten Hopp |
1ebd6d |
The Quest for the Holy Grail (Monty Python)
|
|
Karsten Hopp |
1ebd6d |
|
|
Karsten Hopp |
1ebd6d |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
1ebd6d |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
1ebd6d |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
1ebd6d |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|