comparison src/quickfix.c @ 4197:07fef68eb018 v7.3.850

updated for version 7.3.850 Problem: ":vimgrep //" matches everywhere. Solution: Make it use the previous search pattern. (David B?rgin)
author Bram Moolenaar <bram@vim.org>
date Thu, 07 Mar 2013 16:32:54 +0100
parents 706c87d16d40
children 04736b4030ec
comparison
equal deleted inserted replaced
4196:47b080b0f40d 4197:07fef68eb018
3177 if (p == NULL) 3177 if (p == NULL)
3178 { 3178 {
3179 EMSG(_(e_invalpat)); 3179 EMSG(_(e_invalpat));
3180 goto theend; 3180 goto theend;
3181 } 3181 }
3182 regmatch.regprog = vim_regcomp(s, RE_MAGIC); 3182
3183 if (s != NULL && *s == NUL)
3184 {
3185 /* Pattern is empty, use last search pattern. */
3186 if (last_search_pat() == NULL)
3187 {
3188 EMSG(_(e_noprevre));
3189 goto theend;
3190 }
3191 regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
3192 }
3193 else
3194 regmatch.regprog = vim_regcomp(s, RE_MAGIC);
3195
3183 if (regmatch.regprog == NULL) 3196 if (regmatch.regprog == NULL)
3184 goto theend; 3197 goto theend;
3185 regmatch.rmm_ic = p_ic; 3198 regmatch.rmm_ic = p_ic;
3186 regmatch.rmm_maxcol = 0; 3199 regmatch.rmm_maxcol = 0;
3187 3200