]>
Commit | Line | Data |
---|---|---|
4ff12b6a ER |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.2.258 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.2.258 | |
11 | Problem: v:beval_col and b:beval_text are wrong in UTF-8 text. (Tony | |
12 | Mechelynck) | |
13 | Solution: Use byte number instead of character number for the column. | |
14 | Files: src/ui.c | |
15 | ||
16 | ||
17 | *** ../vim-7.2.257/src/ui.c 2009-07-01 18:04:30.000000000 +0200 | |
18 | --- src/ui.c 2009-09-11 16:11:50.000000000 +0200 | |
19 | *************** | |
20 | *** 3055,3072 **** | |
21 | int vcol; | |
22 | { | |
23 | /* try to advance to the specified column */ | |
24 | - int col = 0; | |
25 | int count = 0; | |
26 | char_u *ptr; | |
27 | ||
28 | ! ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); | |
29 | while (count <= vcol && *ptr != NUL) | |
30 | { | |
31 | - ++col; | |
32 | count += win_lbr_chartabsize(wp, ptr, count, NULL); | |
33 | mb_ptr_adv(ptr); | |
34 | } | |
35 | ! return col; | |
36 | } | |
37 | #endif | |
38 | ||
39 | --- 3055,3071 ---- | |
40 | int vcol; | |
41 | { | |
42 | /* try to advance to the specified column */ | |
43 | int count = 0; | |
44 | char_u *ptr; | |
45 | + char_u *start; | |
46 | ||
47 | ! start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); | |
48 | while (count <= vcol && *ptr != NUL) | |
49 | { | |
50 | count += win_lbr_chartabsize(wp, ptr, count, NULL); | |
51 | mb_ptr_adv(ptr); | |
52 | } | |
53 | ! return (int)(ptr - start); | |
54 | } | |
55 | #endif | |
56 | ||
57 | *** ../vim-7.2.257/src/version.c 2009-09-11 16:17:36.000000000 +0200 | |
58 | --- src/version.c 2009-09-11 16:45:48.000000000 +0200 | |
59 | *************** | |
60 | *** 678,679 **** | |
61 | --- 678,681 ---- | |
62 | { /* Add new patch number below this line */ | |
63 | + /**/ | |
64 | + 258, | |
65 | /**/ | |
66 | ||
67 | -- | |
68 | hundred-and-one symptoms of being an internet addict: | |
69 | 232. You start conversations with, "Have you gotten an ISDN line?" | |
70 | ||
71 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
72 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
73 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
74 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |