]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.317
- updated to 7.2.330
[packages/vim.git] / 7.2.317
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.317
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.317
11 Problem:    Memory leak when adding a highlight group with unprintable
12             characters, resulting in E669.
13 Solution:   Free the memory.  And fix a few typos. (Dominique Pelle)
14 Files:      src/syntax.c
15
16
17 *** ../vim-7.2.316/src/syntax.c 2009-05-17 13:30:58.000000000 +0200
18 --- src/syntax.c        2009-12-16 18:09:05.000000000 +0100
19 ***************
20 *** 206,212 ****
21   static int current_attr = 0;      /* attr of current syntax word */
22   #ifdef FEAT_EVAL
23   static int current_id = 0;        /* ID of current char for syn_get_id() */
24 ! static int current_trans_id = 0;    /* idem, transparancy removed */
25   #endif
26   
27   typedef struct syn_cluster_S
28 --- 206,212 ----
29   static int current_attr = 0;      /* attr of current syntax word */
30   #ifdef FEAT_EVAL
31   static int current_id = 0;        /* ID of current char for syn_get_id() */
32 ! static int current_trans_id = 0;    /* idem, transparency removed */
33   #endif
34   
35   typedef struct syn_cluster_S
36 ***************
37 *** 282,288 ****
38       int               si_idx;                 /* index of syntax pattern or
39                                            KEYWORD_IDX */
40       int               si_id;                  /* highlight group ID for keywords */
41 !     int               si_trans_id;            /* idem, transparancy removed */
42       int               si_m_lnum;              /* lnum of the match */
43       int               si_m_startcol;          /* starting column of the match */
44       lpos_T    si_m_endpos;            /* just after end posn of the match */
45 --- 282,288 ----
46       int               si_idx;                 /* index of syntax pattern or
47                                            KEYWORD_IDX */
48       int               si_id;                  /* highlight group ID for keywords */
49 !     int               si_trans_id;            /* idem, transparency removed */
50       int               si_m_lnum;              /* lnum of the match */
51       int               si_m_startcol;          /* starting column of the match */
52       lpos_T    si_m_endpos;            /* just after end posn of the match */
53 ***************
54 *** 1274,1280 ****
55         dist = syn_buf->b_ml.ml_line_count / (syn_buf->b_sst_len - Rows) + 1;
56   
57       /*
58 !      * Go throught the list to find the "tick" for the oldest entry that can
59        * be removed.  Set "above" when the "tick" for the oldest entry is above
60        * "b_sst_lasttick" (the display tick wraps around).
61        */
62 --- 1274,1280 ----
63         dist = syn_buf->b_ml.ml_line_count / (syn_buf->b_sst_len - Rows) + 1;
64   
65       /*
66 !      * Go through the list to find the "tick" for the oldest entry that can
67        * be removed.  Set "above" when the "tick" for the oldest entry is above
68        * "b_sst_lasttick" (the display tick wraps around).
69        */
70 ***************
71 *** 2319,2325 ****
72                     ? (syn_buf->b_spell_cluster_id == 0)
73                     : (syn_buf->b_syn_spell == SYNSPL_TOP);
74   
75 !     /* nextgroup ends at end of line, unless "skipnl" or "skipemtpy" present */
76       if (current_next_list != NULL
77             && syn_getcurline()[current_col + 1] == NUL
78             && !(current_next_flags & (HL_SKIPNL | HL_SKIPEMPTY)))
79 --- 2319,2325 ----
80                     ? (syn_buf->b_spell_cluster_id == 0)
81                     : (syn_buf->b_syn_spell == SYNSPL_TOP);
82   
83 !     /* nextgroup ends at end of line, unless "skipnl" or "skipempty" present */
84       if (current_next_list != NULL
85             && syn_getcurline()[current_col + 1] == NUL
86             && !(current_next_flags & (HL_SKIPNL | HL_SKIPEMPTY)))
87 ***************
88 *** 6108,6114 ****
89       win_T     *wp;
90       long      lnum;
91       colnr_T   col;
92 !     int               trans;       /* remove transparancy */
93       int               *spellp;     /* return: can do spell checking */
94       int               keep_state;  /* keep state of char at "col" */
95   {
96 --- 6108,6114 ----
97       win_T     *wp;
98       long      lnum;
99       colnr_T   col;
100 !     int               trans;       /* remove transparency */
101       int               *spellp;     /* return: can do spell checking */
102       int               keep_state;  /* keep state of char at "col" */
103   {
104 ***************
105 *** 7523,7529 ****
106   #if defined(FEAT_GUI) || defined(PROTO)
107   /*
108    * Set the normal foreground and background colors according to the "Normal"
109 !  * highlighighting group.  For X11 also set "Menu", "Scrollbar", and
110    * "Tooltip" colors.
111    */
112       void
113 --- 7523,7529 ----
114   #if defined(FEAT_GUI) || defined(PROTO)
115   /*
116    * Set the normal foreground and background colors according to the "Normal"
117 !  * highlighting group.  For X11 also set "Menu", "Scrollbar", and
118    * "Tooltip" colors.
119    */
120       void
121 ***************
122 *** 8647,8652 ****
123 --- 8647,8653 ----
124         if (!vim_isprintc(*p))
125         {
126             EMSG(_("E669: Unprintable character in group name"));
127 +           vim_free(name);
128             return 0;
129         }
130         else if (!ASCII_ISALNUM(*p) && *p != '_')
131 *** ../vim-7.2.316/src/version.c        2009-12-16 17:14:08.000000000 +0100
132 --- src/version.c       2009-12-16 18:09:14.000000000 +0100
133 ***************
134 *** 683,684 ****
135 --- 683,686 ----
136   {   /* Add new patch number below this line */
137 + /**/
138 +     317,
139   /**/
140
141 -- 
142 hundred-and-one symptoms of being an internet addict:
143 35. Your husband tells you he's had the beard for 2 months.
144
145  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
146 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
147 \\\        download, build and distribute -- http://www.A-A-P.org        ///
148  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.032006 seconds and 3 git commands to generate.