1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: When there is no previous substitute pattern, the previous search
12 pattern is used. The other way around doesn't work.
13 Solution: When there is no previous search pattern, use the previous
14 substitute pattern if possible. (Christian Brabandt)
18 *** ../vim-7.3.134/src/search.c 2010-09-21 16:56:29.000000000 +0200
19 --- src/search.c 2011-02-25 18:36:56.000000000 +0100
23 if (spats[RE_SEARCH].pat == NULL) /* no previous pattern */
25 ! EMSG(_(e_noprevre));
29 - /* make search_regcomp() use spats[RE_SEARCH].pat */
30 - searchstr = (char_u *)"";
33 if (pat != NULL && *pat != NUL) /* look for (new) offset */
36 if (spats[RE_SEARCH].pat == NULL) /* no previous pattern */
38 ! pat = spats[RE_SUBST].pat;
41 ! EMSG(_(e_noprevre));
49 ! /* make search_regcomp() use spats[RE_SEARCH].pat */
50 ! searchstr = (char_u *)"";
54 if (pat != NULL && *pat != NUL) /* look for (new) offset */
57 #if defined(FEAT_FIND_ID) || defined(PROTO)
59 * Find identifiers or defines in included files.
60 ! * if p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase.
63 find_pattern_in_path(ptr, dir, len, whole, skip_comments,
65 #if defined(FEAT_FIND_ID) || defined(PROTO)
67 * Find identifiers or defines in included files.
68 ! * If p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase.
71 find_pattern_in_path(ptr, dir, len, whole, skip_comments,
72 *** ../vim-7.3.134/src/version.c 2011-02-25 17:10:22.000000000 +0100
73 --- src/version.c 2011-02-25 18:35:30.000000000 +0100
77 { /* Add new patch number below this line */
83 A real patriot is the fellow who gets a parking ticket and rejoices
84 that the system works.
87 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
88 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
89 \\\ an exciting new programming language -- http://www.Zimbu.org ///
90 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///