]> git.pld-linux.org Git - packages/vim.git/blob - 7.0.061
- new
[packages/vim.git] / 7.0.061
1 To: vim-dev@vim.org
2 Subject: Patch 7.0.061
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.0.061
11 Problem:    Insert mode completion for Vim commands may crash if there is
12             nothing to complete.
13 Solution:   Instead of freeing the pattern make it empty, so that a "not
14             found" error is given. (Yukihiro Nakadaira)
15 Files:      src/edit.c
16
17
18 *** ../vim-7.0.060/src/edit.c   Wed Aug 16 16:24:58 2006
19 --- src/edit.c  Wed Aug 16 21:20:29 2006
20 ***************
21 *** 4691,4708 ****
22                                      (int)STRLEN(compl_pattern), curs_col);
23             if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL
24                     || compl_xp.xp_context == EXPAND_NOTHING)
25 !           {
26                 compl_col = curs_col;
27 -               compl_length = 0;
28 -               vim_free(compl_pattern);
29 -               compl_pattern = NULL;
30 -           }
31             else
32 !           {
33 !               startcol = (int)(compl_xp.xp_pattern - compl_pattern);
34 !               compl_col = startcol;
35 !               compl_length = curs_col - startcol;
36 !           }
37         }
38         else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI)
39         {
40 --- 4692,4703 ----
41                                      (int)STRLEN(compl_pattern), curs_col);
42             if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL
43                     || compl_xp.xp_context == EXPAND_NOTHING)
44 !               /* No completion possible, use an empty pattern to get a
45 !                * "pattern not found" message. */
46                 compl_col = curs_col;
47             else
48 !               compl_col = (int)(compl_xp.xp_pattern - compl_pattern);
49 !           compl_length = curs_col - compl_col;
50         }
51         else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI)
52         {
53 *** ../vim-7.0.060/src/version.c        Wed Aug 16 19:34:59 2006
54 --- src/version.c       Wed Aug 16 21:25:03 2006
55 ***************
56 *** 668,669 ****
57 --- 668,671 ----
58   {   /* Add new patch number below this line */
59 + /**/
60 +     61,
61   /**/
62
63 -- 
64 hundred-and-one symptoms of being an internet addict:
65 165. You have a web page burned into your glasses
66
67  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
68 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
69 \\\        download, build and distribute -- http://www.A-A-P.org        ///
70  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.032894 seconds and 3 git commands to generate.