1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
To: vim_dev@googlegroups.com
Subject: Patch 7.3.135
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.135
Problem: When there is no previous substitute pattern, the previous search
pattern is used. The other way around doesn't work.
Solution: When there is no previous search pattern, use the previous
substitute pattern if possible. (Christian Brabandt)
Files: src/search.c
*** ../vim-7.3.134/src/search.c 2010-09-21 16:56:29.000000000 +0200
--- src/search.c 2011-02-25 18:36:56.000000000 +0100
***************
*** 1161,1172 ****
{
if (spats[RE_SEARCH].pat == NULL) /* no previous pattern */
{
! EMSG(_(e_noprevre));
! retval = 0;
! goto end_do_search;
}
- /* make search_regcomp() use spats[RE_SEARCH].pat */
- searchstr = (char_u *)"";
}
if (pat != NULL && *pat != NUL) /* look for (new) offset */
--- 1161,1180 ----
{
if (spats[RE_SEARCH].pat == NULL) /* no previous pattern */
{
! pat = spats[RE_SUBST].pat;
! if (pat == NULL)
! {
! EMSG(_(e_noprevre));
! retval = 0;
! goto end_do_search;
! }
! searchstr = pat;
! }
! else
! {
! /* make search_regcomp() use spats[RE_SEARCH].pat */
! searchstr = (char_u *)"";
}
}
if (pat != NULL && *pat != NUL) /* look for (new) offset */
***************
*** 4527,4533 ****
#if defined(FEAT_FIND_ID) || defined(PROTO)
/*
* Find identifiers or defines in included files.
! * if p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase.
*/
void
find_pattern_in_path(ptr, dir, len, whole, skip_comments,
--- 4535,4541 ----
#if defined(FEAT_FIND_ID) || defined(PROTO)
/*
* Find identifiers or defines in included files.
! * If p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase.
*/
void
find_pattern_in_path(ptr, dir, len, whole, skip_comments,
*** ../vim-7.3.134/src/version.c 2011-02-25 17:10:22.000000000 +0100
--- src/version.c 2011-02-25 18:35:30.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
{ /* Add new patch number below this line */
+ /**/
+ 135,
/**/
--
A real patriot is the fellow who gets a parking ticket and rejoices
that the system works.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|