]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.342
- up to 7.2.344
[packages/vim.git] / 7.2.342
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.342
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.342
11 Problem:    Popup menu displayed wrong in 'rightleft' mode when there are
12             multi-byte characters.
13 Solution:   Adjust the column computations. (Dominique Pelle)
14 Files:      src/popupmnu.c
15
16
17 *** ../vim-7.2.341/src/popupmnu.c       2008-11-15 14:10:23.000000000 +0100
18 --- src/popupmnu.c      2010-01-19 17:57:05.000000000 +0100
19 ***************
20 *** 345,365 ****
21                             if (st != NULL)
22                             {
23                                 char_u  *rt = reverse_text(st);
24 -                               char_u  *rt_saved = rt;
25 -                               int     len, j;
26   
27                                 if (rt != NULL)
28                                 {
29 !                                   len = (int)STRLEN(rt);
30 !                                   if (len > pum_width)
31                                     {
32 !                                       for (j = pum_width; j < len; ++j)
33                                             mb_ptr_adv(rt);
34 !                                       len = pum_width;
35                                     }
36 !                                   screen_puts_len(rt, len, row,
37 !                                                       col - len + 1, attr);
38 !                                   vim_free(rt_saved);
39                                 }
40                                 vim_free(st);
41                             }
42 --- 345,380 ----
43                             if (st != NULL)
44                             {
45                                 char_u  *rt = reverse_text(st);
46   
47                                 if (rt != NULL)
48                                 {
49 !                                   char_u      *rt_start = rt;
50 !                                   int         size;
51
52 !                                   size = vim_strsize(rt);
53 !                                   if (size > pum_width)
54                                     {
55 !                                       do
56 !                                       {
57 !                                           size -= has_mbyte
58 !                                                   ? (*mb_ptr2cells)(rt) : 1;
59                                             mb_ptr_adv(rt);
60 !                                       } while (size > pum_width);
61
62 !                                       if (size < pum_width)
63 !                                       {
64 !                                           /* Most left character requires
65 !                                            * 2-cells but only 1 cell is
66 !                                            * available on screen.  Put a
67 !                                            * '<' on the left of the pum
68 !                                            * item */
69 !                                           *(--rt) = '<';
70 !                                           size++;
71 !                                       }
72                                     }
73 !                                   screen_puts_len(rt, (int)STRLEN(rt),
74 !                                                  row, col - size + 1, attr);
75 !                                   vim_free(rt_start);
76                                 }
77                                 vim_free(st);
78                             }
79 *** ../vim-7.2.341/src/version.c        2010-01-19 17:40:39.000000000 +0100
80 --- src/version.c       2010-01-19 18:03:22.000000000 +0100
81 ***************
82 *** 683,684 ****
83 --- 683,686 ----
84   {   /* Add new patch number below this line */
85 + /**/
86 +     342,
87   /**/
88
89 -- 
90 I have a watch cat! Just break in and she'll watch.
91
92  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
93 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
94 \\\        download, build and distribute -- http://www.A-A-P.org        ///
95  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.062552 seconds and 3 git commands to generate.