]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.233
- updated to 7.1.326
[packages/vim.git] / 7.1.233
1 To: vim-dev@vim.org
2 Subject: Patch 7.1.233
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.1.233
11 Problem:    Crash when doing Insert mode completion for a user defined
12             command.  (Yegappan Lakshmanan)
13 Solution:   Don't use the non-existing command line.
14 Files:      src/ex_getln.c
15
16
17 *** ../vim-7.1.232/src/ex_getln.c       Fri Jan  4 15:16:57 2008
18 --- src/ex_getln.c      Fri Jan 18 13:07:11 2008
19 ***************
20 *** 4655,4661 ****
21   static void * call_user_expand_func __ARGS((void *(*user_expand_func) __ARGS((char_u *, int, char_u **, int)), expand_T       *xp, int *num_file, char_u ***file));
22   
23   /*
24 !  * call "user_expand_func()" to invoke a user defined VimL function and return
25    * the result (either a string or a List).
26    */
27       static void *
28 --- 4655,4661 ----
29   static void * call_user_expand_func __ARGS((void *(*user_expand_func) __ARGS((char_u *, int, char_u **, int)), expand_T       *xp, int *num_file, char_u ***file));
30   
31   /*
32 !  * Call "user_expand_func()" to invoke a user defined VimL function and return
33    * the result (either a string or a List).
34    */
35       static void *
36 ***************
37 *** 4677,4687 ****
38       *num_file = 0;
39       *file = NULL;
40   
41 !     keep = ccline.cmdbuff[ccline.cmdlen];
42 !     ccline.cmdbuff[ccline.cmdlen] = 0;
43 !     sprintf((char *)num, "%d", ccline.cmdpos);
44       args[0] = xp->xp_pattern;
45 -     args[1] = ccline.cmdbuff;
46       args[2] = num;
47   
48       /* Save the cmdline, we don't know what the function may do. */
49 --- 4677,4698 ----
50       *num_file = 0;
51       *file = NULL;
52   
53 !     if (ccline.cmdbuff == NULL)
54 !     {
55 !       /* Completion from Insert mode, pass fake arguments. */
56 !       keep = 0;
57 !       sprintf((char *)num, "%d", STRLEN(xp->xp_pattern));
58 !       args[1] = xp->xp_pattern;
59 !     }
60 !     else
61 !     {
62 !       /* Completion on the command line, pass real arguments. */
63 !       keep = ccline.cmdbuff[ccline.cmdlen];
64 !       ccline.cmdbuff[ccline.cmdlen] = 0;
65 !       sprintf((char *)num, "%d", ccline.cmdpos);
66 !       args[1] = ccline.cmdbuff;
67 !     }
68       args[0] = xp->xp_pattern;
69       args[2] = num;
70   
71       /* Save the cmdline, we don't know what the function may do. */
72 ***************
73 *** 4694,4701 ****
74   
75       ccline = save_ccline;
76       current_SID = save_current_SID;
77
78 !     ccline.cmdbuff[ccline.cmdlen] = keep;
79   
80       return ret;
81   }
82 --- 4705,4712 ----
83   
84       ccline = save_ccline;
85       current_SID = save_current_SID;
86 !     if (ccline.cmdbuff != NULL)
87 !       ccline.cmdbuff[ccline.cmdlen] = keep;
88   
89       return ret;
90   }
91 *** ../vim-7.1.232/src/version.c        Fri Jan 18 11:40:02 2008
92 --- src/version.c       Fri Jan 18 13:01:05 2008
93 ***************
94 *** 668,669 ****
95 --- 668,671 ----
96   {   /* Add new patch number below this line */
97 + /**/
98 +     233,
99   /**/
100
101 -- 
102 "I love deadlines.  I especially like the whooshing sound they
103 make as they go flying by."
104                          -- Douglas Adams
105
106  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
107 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
108 \\\        download, build and distribute -- http://www.A-A-P.org        ///
109  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.03313 seconds and 3 git commands to generate.