]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.224
- new
[packages/vim.git] / 7.2.224
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.224
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.224
11 Problem:    Crash when using 'completefunc'. (Ingo Karkat)
12 Solution:   Disallow entering edit() recursively when doing completion.
13 Files:      src/edit.c
14
15
16 *** ../vim-7.2.223/src/edit.c   2009-05-26 11:01:43.000000000 +0200
17 --- src/edit.c  2009-07-09 18:01:49.000000000 +0200
18 ***************
19 *** 114,119 ****
20 --- 114,123 ----
21    * FALSE the word to be completed must be located. */
22   static int      compl_started = FALSE;
23   
24 + /* Set when doing something for completion that may call edit() recursively,
25 +  * which is not allowed. */
26 + static int      compl_busy = FALSE;
27
28   static int      compl_matches = 0;
29   static char_u   *compl_pattern = NULL;
30   static int      compl_direction = FORWARD;
31 ***************
32 *** 346,352 ****
33   
34   #ifdef FEAT_INS_EXPAND
35       /* Don't allow recursive insert mode when busy with completion. */
36 !     if (compl_started || pum_visible())
37       {
38         EMSG(_(e_secure));
39         return FALSE;
40 --- 350,356 ----
41   
42   #ifdef FEAT_INS_EXPAND
43       /* Don't allow recursive insert mode when busy with completion. */
44 !     if (compl_started || compl_busy || pum_visible())
45       {
46         EMSG(_(e_secure));
47         return FALSE;
48 ***************
49 *** 1340,1347 ****
50 --- 1344,1353 ----
51                 goto normalchar;
52   
53   docomplete:
54 +           compl_busy = TRUE;
55             if (ins_complete(c) == FAIL)
56                 compl_cont_status = 0;
57 +           compl_busy = FALSE;
58             break;
59   #endif /* FEAT_INS_EXPAND */
60   
61 ***************
62 *** 3172,3177 ****
63 --- 3178,3184 ----
64         vim_free(match);
65       } while (compl_curr_match != NULL && compl_curr_match != compl_first_match);
66       compl_first_match = compl_curr_match = NULL;
67 +     compl_shown_match = NULL;
68   }
69   
70       static void
71 *** ../vim-7.2.223/src/version.c        2009-07-09 15:55:34.000000000 +0200
72 --- src/version.c       2009-07-09 18:14:16.000000000 +0200
73 ***************
74 *** 678,679 ****
75 --- 678,681 ----
76   {   /* Add new patch number below this line */
77 + /**/
78 +     224,
79   /**/
80
81 -- 
82 hundred-and-one symptoms of being an internet addict:
83 77. The phone company asks you to test drive their new PBX system
84
85  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
86 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
87 \\\        download, build and distribute -- http://www.A-A-P.org        ///
88  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.450751 seconds and 3 git commands to generate.