]>
Commit | Line | Data |
---|---|---|
c84df032 ER |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.0.165 | |
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.165 | |
11 | Problem: Using CTRL-L at the search prompt adds a "/" and other characters | |
12 | without escaping, causing the pattern not to match. | |
13 | Solution: Escape special characters with a backslash. | |
14 | Files: src/ex_getln.c | |
15 | ||
16 | ||
17 | *** ../vim-7.0.164/src/ex_getln.c Tue Oct 17 16:26:52 2006 | |
18 | --- src/ex_getln.c Tue Nov 14 21:36:13 2006 | |
19 | *************** | |
20 | *** 34,40 **** | |
21 | int xp_context; /* type of expansion */ | |
22 | # ifdef FEAT_EVAL | |
23 | char_u *xp_arg; /* user-defined expansion arg */ | |
24 | ! int input_fn; /* Invoked for input() function */ | |
25 | # endif | |
26 | }; | |
27 | ||
28 | --- 34,40 ---- | |
29 | int xp_context; /* type of expansion */ | |
30 | # ifdef FEAT_EVAL | |
31 | char_u *xp_arg; /* user-defined expansion arg */ | |
32 | ! int input_fn; /* when TRUE Invoked for input() function */ | |
33 | # endif | |
34 | }; | |
35 | ||
36 | *************** | |
37 | *** 1390,1396 **** | |
38 | --- 1390,1406 ---- | |
39 | { | |
40 | c = gchar_cursor(); | |
41 | if (c != NUL) | |
42 | + { | |
43 | + if (c == firstc || vim_strchr((char_u *)( | |
44 | + p_magic ? "\\^$.*[" : "\\^$"), c) | |
45 | + != NULL) | |
46 | + { | |
47 | + /* put a backslash before special characters */ | |
48 | + stuffcharReadbuff(c); | |
49 | + c = '\\'; | |
50 | + } | |
51 | break; | |
52 | + } | |
53 | } | |
54 | goto cmdline_not_changed; | |
55 | } | |
56 | *** ../vim-7.0.164/src/version.c Tue Nov 14 20:24:32 2006 | |
57 | --- src/version.c Tue Nov 21 11:28:43 2006 | |
58 | *************** | |
59 | *** 668,669 **** | |
60 | --- 668,671 ---- | |
61 | { /* Add new patch number below this line */ | |
62 | + /**/ | |
63 | + 165, | |
64 | /**/ | |
65 | ||
66 | -- | |
67 | He was not in the least bit scared to be mashed into a pulp | |
68 | Or to have his eyes gouged out and his elbows broken; | |
69 | To have his kneecaps split and his body burned away | |
70 | And his limbs all hacked and mangled, brave Sir Robin. | |
71 | "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD | |
72 | ||
73 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
74 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
75 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
76 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |