|
Karsten Hopp |
d95d40 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
d95d40 |
Subject: Patch 7.2.258
|
|
Karsten Hopp |
d95d40 |
Fcc: outbox
|
|
Karsten Hopp |
d95d40 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
d95d40 |
Mime-Version: 1.0
|
|
Karsten Hopp |
d95d40 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
d95d40 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
d95d40 |
------------
|
|
Karsten Hopp |
d95d40 |
|
|
Karsten Hopp |
d95d40 |
Patch 7.2.258
|
|
Karsten Hopp |
d95d40 |
Problem: v:beval_col and b:beval_text are wrong in UTF-8 text. (Tony
|
|
Karsten Hopp |
d95d40 |
Mechelynck)
|
|
Karsten Hopp |
d95d40 |
Solution: Use byte number instead of character number for the column.
|
|
Karsten Hopp |
d95d40 |
Files: src/ui.c
|
|
Karsten Hopp |
d95d40 |
|
|
Karsten Hopp |
d95d40 |
|
|
Karsten Hopp |
d95d40 |
*** ../vim-7.2.257/src/ui.c 2009-07-01 18:04:30.000000000 +0200
|
|
Karsten Hopp |
d95d40 |
--- src/ui.c 2009-09-11 16:11:50.000000000 +0200
|
|
Karsten Hopp |
d95d40 |
***************
|
|
Karsten Hopp |
d95d40 |
*** 3055,3072 ****
|
|
Karsten Hopp |
d95d40 |
int vcol;
|
|
Karsten Hopp |
d95d40 |
{
|
|
Karsten Hopp |
d95d40 |
/* try to advance to the specified column */
|
|
Karsten Hopp |
d95d40 |
- int col = 0;
|
|
Karsten Hopp |
d95d40 |
int count = 0;
|
|
Karsten Hopp |
d95d40 |
char_u *ptr;
|
|
Karsten Hopp |
d95d40 |
|
|
Karsten Hopp |
d95d40 |
! ptr = ml_get_buf(wp->w_buffer, lnum, FALSE);
|
|
Karsten Hopp |
d95d40 |
while (count <= vcol && *ptr != NUL)
|
|
Karsten Hopp |
d95d40 |
{
|
|
Karsten Hopp |
d95d40 |
- ++col;
|
|
Karsten Hopp |
d95d40 |
count += win_lbr_chartabsize(wp, ptr, count, NULL);
|
|
Karsten Hopp |
d95d40 |
mb_ptr_adv(ptr);
|
|
Karsten Hopp |
d95d40 |
}
|
|
Karsten Hopp |
d95d40 |
! return col;
|
|
Karsten Hopp |
d95d40 |
}
|
|
Karsten Hopp |
d95d40 |
#endif
|
|
Karsten Hopp |
d95d40 |
|
|
Karsten Hopp |
d95d40 |
--- 3055,3071 ----
|
|
Karsten Hopp |
d95d40 |
int vcol;
|
|
Karsten Hopp |
d95d40 |
{
|
|
Karsten Hopp |
d95d40 |
/* try to advance to the specified column */
|
|
Karsten Hopp |
d95d40 |
int count = 0;
|
|
Karsten Hopp |
d95d40 |
char_u *ptr;
|
|
Karsten Hopp |
d95d40 |
+ char_u *start;
|
|
Karsten Hopp |
d95d40 |
|
|
Karsten Hopp |
d95d40 |
! start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE);
|
|
Karsten Hopp |
d95d40 |
while (count <= vcol && *ptr != NUL)
|
|
Karsten Hopp |
d95d40 |
{
|
|
Karsten Hopp |
d95d40 |
count += win_lbr_chartabsize(wp, ptr, count, NULL);
|
|
Karsten Hopp |
d95d40 |
mb_ptr_adv(ptr);
|
|
Karsten Hopp |
d95d40 |
}
|
|
Karsten Hopp |
d95d40 |
! return (int)(ptr - start);
|
|
Karsten Hopp |
d95d40 |
}
|
|
Karsten Hopp |
d95d40 |
#endif
|
|
Karsten Hopp |
d95d40 |
|
|
Karsten Hopp |
d95d40 |
*** ../vim-7.2.257/src/version.c 2009-09-11 16:17:36.000000000 +0200
|
|
Karsten Hopp |
d95d40 |
--- src/version.c 2009-09-11 16:45:48.000000000 +0200
|
|
Karsten Hopp |
d95d40 |
***************
|
|
Karsten Hopp |
d95d40 |
*** 678,679 ****
|
|
Karsten Hopp |
d95d40 |
--- 678,681 ----
|
|
Karsten Hopp |
d95d40 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
d95d40 |
+ /**/
|
|
Karsten Hopp |
d95d40 |
+ 258,
|
|
Karsten Hopp |
d95d40 |
/**/
|
|
Karsten Hopp |
d95d40 |
|
|
Karsten Hopp |
d95d40 |
--
|
|
Karsten Hopp |
d95d40 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
d95d40 |
232. You start conversations with, "Have you gotten an ISDN line?"
|
|
Karsten Hopp |
d95d40 |
|
|
Karsten Hopp |
d95d40 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
d95d40 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
d95d40 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
d95d40 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|