Merge branch 'vim'

This commit is contained in:
Bjorn Winckler
2013-06-10 16:03:24 +02:00
30 changed files with 807 additions and 191 deletions
+8
View File
@@ -2485,3 +2485,11 @@ a30e3762957d61966152040315d160f860433576 v7-3-1145
e3f9e33fb28c367aac7b2270b6fd304fd755b6d4 v7-3-1146
3cd3cc1e91193a0b45e6aff1373cd4802e595a16 v7-3-1147
220bdea4f57919c290d92b1f6c83a7252cd660b6 v7-3-1148
66803af09906a828b9f41d7ae0f7a379137eaf99 v7-3-1149
3dbd251777de232c168d87650acda5fec408146c v7-3-1150
4d7e3df04256790855f7a6dc289f32ffc04da133 v7-3-1151
9909e44879b9f80679fd05af19a423b2673b2301 v7-3-1152
bc3f4804cf470cec5773d8842743efb760f69102 v7-3-1153
6419ee8098c80f0418081c73b790b09c61f13c3a v7-3-1154
bf1e6326df1104cabc04b8490f9456dbda901fd2 v7-3-1155
8c4324e6f4779ee316361511ff783f6344750be9 v7-3-1156
+4 -4
View File
@@ -1902,7 +1902,7 @@ free_buf_options(buf, free_p_ff)
#ifdef FEAT_SPELL
clear_string_option(&buf->b_s.b_p_spc);
clear_string_option(&buf->b_s.b_p_spf);
vim_free(buf->b_s.b_cap_prog);
vim_regfree(buf->b_s.b_cap_prog);
buf->b_s.b_cap_prog = NULL;
clear_string_option(&buf->b_s.b_p_spl);
#endif
@@ -2250,7 +2250,7 @@ buflist_findpat(pattern, pattern_end, unlisted, diffmode, curtab_only)
match = buf->b_fnum; /* remember first match */
}
vim_free(prog);
vim_regfree(prog);
if (match >= 0) /* found one match */
break;
}
@@ -2359,14 +2359,14 @@ ExpandBufnames(pat, num_file, file, options)
*file = (char_u **)alloc((unsigned)(count * sizeof(char_u *)));
if (*file == NULL)
{
vim_free(prog);
vim_regfree(prog);
if (patc != pat)
vim_free(patc);
return FAIL;
}
}
}
vim_free(prog);
vim_regfree(prog);
if (count) /* match(es) found, break here */
break;
}
+1 -1
View File
@@ -3144,7 +3144,7 @@ ins_compl_dictionaries(dict_start, pat, flags, thesaurus)
theend:
p_scs = save_p_scs;
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
vim_free(buf);
}
+7 -5
View File
@@ -2734,6 +2734,8 @@ get_lval(name, rettv, lp, unlet, skip, quiet, fne_flags)
prevval = key[len];
key[len] = NUL;
}
else
prevval = 0; /* avoid compiler warning */
wrong = (lp->ll_dict->dv_scope == VAR_DEF_SCOPE
&& rettv->v_type == VAR_FUNC
&& var_check_func_name(key, lp->ll_di == NULL))
@@ -4560,7 +4562,7 @@ eval4(arg, rettv, evaluate)
if (regmatch.regprog != NULL)
{
n1 = vim_regexec_nl(&regmatch, s1, (colnr_T)0);
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
if (type == TYPE_NOMATCH)
n1 = !n1;
}
@@ -14001,7 +14003,7 @@ find_some_match(argvars, rettv, type)
rettv->vval.v_number += (varnumber_T)(str - expr);
}
}
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
}
theend:
@@ -17242,7 +17244,7 @@ f_split(argvars, rettv)
str = regmatch.endp[0];
}
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
}
p_cpo = save_cpo;
@@ -21094,7 +21096,7 @@ ex_function(eap)
list_func_head(fp, FALSE);
}
}
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
}
}
if (*p == '/')
@@ -24248,7 +24250,7 @@ do_string_sub(str, pat, sub, flags)
if (ga.ga_data != NULL)
STRCPY((char *)ga.ga_data + ga.ga_len, tail);
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
}
ret = vim_strsave(ga.ga_data == NULL ? str : (char_u *)ga.ga_data);
+3 -3
View File
@@ -571,7 +571,7 @@ sortend:
vim_free(nrs);
vim_free(sortbuf1);
vim_free(sortbuf2);
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
if (got_int)
EMSG(_(e_interr));
}
@@ -5261,7 +5261,7 @@ outofmem:
changed_window_setting();
#endif
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
}
/*
@@ -5436,7 +5436,7 @@ ex_global(eap)
global_exe(cmd);
ml_clearmarked(); /* clear rest of the marks */
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
}
/*
+2 -2
View File
@@ -652,7 +652,7 @@ ex_breakdel(eap)
while (gap->ga_len > 0)
{
vim_free(DEBUGGY(gap, todel).dbg_name);
vim_free(DEBUGGY(gap, todel).dbg_prog);
vim_regfree(DEBUGGY(gap, todel).dbg_prog);
--gap->ga_len;
if (todel < gap->ga_len)
mch_memmove(&DEBUGGY(gap, todel), &DEBUGGY(gap, todel + 1),
@@ -2058,7 +2058,7 @@ do_arglist(str, what, after)
--match;
}
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
vim_free(p);
if (!didone)
EMSG2(_(e_nomatch2), ((char_u **)new_ga.ga_data)[i]);
+1 -1
View File
@@ -7797,7 +7797,7 @@ ex_open(eap)
curwin->w_cursor.col = (colnr_T)(regmatch.startp[0] - p);
else
EMSG(_(e_nomatch));
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
}
/* Move to the NUL, ignore any other arguments. */
eap->arg += STRLEN(eap->arg);
+1 -1
View File
@@ -1576,7 +1576,7 @@ ex_catch(eap)
caught = vim_regexec_nl(&regmatch, current_exception->value,
(colnr_T)0);
got_int |= prev_got_int;
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
}
}
}
+2 -2
View File
@@ -4731,7 +4731,7 @@ ExpandFromContext(xp, pat, num_file, file, options)
}
}
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
return ret;
#endif /* FEAT_CMDL_COMPL */
@@ -5799,7 +5799,7 @@ del_history_entry(histype, str)
if (history[histype][idx].hisstr == NULL)
hisidx[histype] = -1;
}
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
return found;
}
+2 -2
View File
@@ -7959,7 +7959,7 @@ au_cleanup()
if (ap->pat == NULL)
{
*prev_ap = ap->next;
vim_free(ap->reg_prog);
vim_regfree(ap->reg_prog);
vim_free(ap);
}
else
@@ -10108,7 +10108,7 @@ match_file_pat(pattern, prog, fname, sfname, tail, allow_dirs)
result = TRUE;
if (prog == NULL)
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
return result;
}
#endif
+1 -1
View File
@@ -5377,7 +5377,7 @@ gui_do_findrepl(flags, find_text, repl_text, down)
}
else
MSG(_("No match at cursor, finding next"));
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
}
}
+2
View File
@@ -272,6 +272,7 @@
# define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
# define MB_CHARLEN(p) (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
# define MB_CHAR2LEN(c) (has_mbyte ? mb_char2len(c) : 1)
# define PTR2CHAR(p) (has_mbyte ? mb_ptr2char(p) : (int)*(p))
#else
# define MB_PTR2LEN(p) 1
@@ -280,6 +281,7 @@
# define mb_ptr_back(s, p) --p
# define MB_COPY_CHAR(f, t) *t++ = *f++
# define MB_CHARLEN(p) STRLEN(p)
# define MB_CHAR2LEN(c) 1
# define PTR2CHAR(p) ((int)*(p))
#endif
+4 -4
View File
@@ -456,8 +456,8 @@ get_number_indent(lnum)
pos.coladd = 0;
#endif
}
vim_regfree(regmatch.regprog);
}
vim_free(regmatch.regprog);
if (pos.lnum == 0 || *ml_get_pos(&pos) == NUL)
return -1;
@@ -9757,7 +9757,7 @@ dos_expandpath(
# endif
#endif
vim_free(buf);
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
vim_free(matchname);
matches = gap->ga_len - start_len;
@@ -9999,7 +9999,7 @@ unix_expandpath(gap, path, wildoff, flags, didstar)
}
vim_free(buf);
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
matches = gap->ga_len - start_len;
if (matches > 0)
@@ -10364,7 +10364,7 @@ theend:
vim_free(in_curdir);
}
ga_clear_strings(&path_ga);
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
if (sort_again)
remove_duplicates(gap);
+3 -3
View File
@@ -1134,7 +1134,7 @@ free_all_mem()
/* Free some global vars. */
vim_free(username);
# ifdef FEAT_CLIPBOARD
vim_free(clip_exclude_prog);
vim_regfree(clip_exclude_prog);
# endif
vim_free(last_cmdline);
# ifdef FEAT_CMDHIST
@@ -5014,8 +5014,8 @@ vim_findfile(search_ctx_arg)
#endif
{
/*
* we don't have further wildcards to expand, so we have to
* check for the final file now
* We don't have further wildcards to expand, so we have to
* check for the final file now.
*/
for (i = stackp->ffs_filearray_cur;
i < stackp->ffs_filearray_size; ++i)
+4 -4
View File
@@ -7578,7 +7578,7 @@ check_clipboard_option()
clip_autoselect_plus = new_autoselect_plus;
clip_autoselectml = new_autoselectml;
clip_html = new_html;
vim_free(clip_exclude_prog);
vim_regfree(clip_exclude_prog);
clip_exclude_prog = new_exclude_prog;
#ifdef FEAT_GUI_GTK
if (gui.in_use)
@@ -7589,7 +7589,7 @@ check_clipboard_option()
#endif
}
else
vim_free(new_exclude_prog);
vim_regfree(new_exclude_prog);
return errmsg;
}
@@ -7616,16 +7616,16 @@ compile_cap_prog(synblock)
if (re != NULL)
{
synblock->b_cap_prog = vim_regcomp(re, RE_MAGIC);
vim_free(re);
if (synblock->b_cap_prog == NULL)
{
synblock->b_cap_prog = rp; /* restore the previous program */
return e_invarg;
}
vim_free(re);
}
}
vim_free(rp);
vim_regfree(rp);
return NULL;
}
#endif
+5 -4
View File
@@ -2,16 +2,17 @@
int re_multiline __ARGS((regprog_T *prog));
int re_lookbehind __ARGS((regprog_T *prog));
char_u *skip_regexp __ARGS((char_u *startp, int dirc, int magic, char_u **newp));
regprog_T *vim_regcomp __ARGS((char_u *expr, int re_flags));
int vim_regcomp_had_eol __ARGS((void));
void free_regexp_stuff __ARGS((void));
int vim_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
int vim_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
long vim_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm));
reg_extmatch_T *ref_extmatch __ARGS((reg_extmatch_T *em));
void unref_extmatch __ARGS((reg_extmatch_T *em));
char_u *regtilde __ARGS((char_u *source, int magic));
int vim_regsub __ARGS((regmatch_T *rmp, char_u *source, char_u *dest, int copy, int magic, int backslash));
int vim_regsub_multi __ARGS((regmmatch_T *rmp, linenr_T lnum, char_u *source, char_u *dest, int copy, int magic, int backslash));
char_u *reg_submatch __ARGS((int no));
regprog_T *vim_regcomp __ARGS((char_u *expr_arg, int re_flags));
void vim_regfree __ARGS((regprog_T *prog));
int vim_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
int vim_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
long vim_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm));
/* vim: set ft=c : */
+3 -3
View File
@@ -863,7 +863,7 @@ qf_init_ok:
for (fmt_ptr = fmt_first; fmt_ptr != NULL; fmt_ptr = fmt_first)
{
fmt_first = fmt_ptr->next;
vim_free(fmt_ptr->prog);
vim_regfree(fmt_ptr->prog);
vim_free(fmt_ptr);
}
qf_clean_dir_stack(&dir_stack);
@@ -3487,7 +3487,7 @@ theend:
vim_free(dirname_now);
vim_free(dirname_start);
vim_free(target_dir);
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
}
/*
@@ -4178,7 +4178,7 @@ ex_helpgrep(eap)
}
}
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
#ifdef FEAT_MBYTE
if (vc.vc_type != CONV_NONE)
convert_setup(&vc, NULL, NULL);
+28 -2
View File
@@ -1297,7 +1297,8 @@ skip_regexp(startp, dirc, magic, newp)
return p;
}
static regprog_T *bt_regcomp __ARGS((char_u *expr, int re_flags));
static regprog_T *bt_regcomp __ARGS((char_u *expr, int re_flags));
static void bt_regfree __ARGS((regprog_T *prog));
/*
* bt_regcomp() - compile a regular expression into internal code for the
@@ -1454,6 +1455,16 @@ bt_regcomp(expr, re_flags)
return (regprog_T *)r;
}
/*
* Free a compiled regexp program, returned by bt_regcomp().
*/
static void
bt_regfree(prog)
regprog_T *prog;
{
vim_free(prog);
}
/*
* Setup to parse the regexp. Used once to get the length and once to do it.
*/
@@ -7876,6 +7887,7 @@ reg_submatch(no)
static regengine_T bt_regengine =
{
bt_regcomp,
bt_regfree,
bt_regexec,
#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
|| defined(FIND_REPLACE_DIALOG) || defined(PROTO)
@@ -7893,6 +7905,7 @@ static regengine_T bt_regengine =
static regengine_T nfa_regengine =
{
nfa_regcomp,
nfa_regfree,
nfa_regexec,
#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
|| defined(FIND_REPLACE_DIALOG) || defined(PROTO)
@@ -7920,7 +7933,9 @@ static char_u regname[][30] = {
/*
* Compile a regular expression into internal code.
* Returns the program in allocated memory. Returns NULL for an error.
* Returns the program in allocated memory.
* Use vim_regfree() to free the memory.
* Returns NULL for an error.
*/
regprog_T *
vim_regcomp(expr_arg, re_flags)
@@ -7996,6 +8011,17 @@ vim_regcomp(expr_arg, re_flags)
return prog;
}
/*
* Free a compiled regexp program, returned by vim_regcomp().
*/
void
vim_regfree(prog)
regprog_T *prog;
{
if (prog != NULL)
prog->engine->regfree(prog);
}
/*
* Match a regexp against a string.
* "rmp->regprog" is a compiled regexp as returned by vim_regcomp().
+2
View File
@@ -89,6 +89,7 @@ typedef struct
int reganch; /* pattern starts with ^ */
int regstart; /* char at start of pattern */
char_u *match_text; /* plain text to match with */
int has_zend; /* pattern contains \ze */
int has_backref; /* pattern contains \1 .. \9 */
@@ -147,6 +148,7 @@ typedef struct
struct regengine
{
regprog_T *(*regcomp)(char_u*, int);
void (*regfree)(regprog_T *);
int (*regexec)(regmatch_T*, char_u*, colnr_T);
#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
|| defined(FIND_REPLACE_DIALOG) || defined(PROTO)
+660 -127
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -7095,7 +7095,7 @@ end_search_hl()
{
if (search_hl.rm.regprog != NULL)
{
vim_free(search_hl.rm.regprog);
vim_regfree(search_hl.rm.regprog);
search_hl.rm.regprog = NULL;
}
}
@@ -7297,7 +7297,7 @@ next_search_hl(win, shl, lnum, mincol)
if (shl == &search_hl)
{
/* don't free regprog in the match list, it's a copy */
vim_free(shl->rm.regprog);
vim_regfree(shl->rm.regprog);
no_hlsearch = TRUE;
}
shl->rm.regprog = NULL;
+5 -5
View File
@@ -981,7 +981,7 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum, tm)
}
while (--count > 0 && found); /* stop after count matches or no match */
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
called_emsg |= save_called_emsg;
@@ -4689,7 +4689,7 @@ is_zerowidth(pattern)
}
called_emsg |= save_called_emsg;
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
return result;
}
#endif /* FEAT_VISUAL */
@@ -5417,9 +5417,9 @@ exit_matched:
fpip_end:
vim_free(file_line);
vim_free(regmatch.regprog);
vim_free(incl_regmatch.regprog);
vim_free(def_regmatch.regprog);
vim_regfree(regmatch.regprog);
vim_regfree(incl_regmatch.regprog);
vim_regfree(def_regmatch.regprog);
}
static void
+4 -4
View File
@@ -2658,7 +2658,7 @@ slang_clear(lp)
ga_clear(gap);
for (i = 0; i < lp->sl_prefixcnt; ++i)
vim_free(lp->sl_prefprog[i]);
vim_regfree(lp->sl_prefprog[i]);
lp->sl_prefixcnt = 0;
vim_free(lp->sl_prefprog);
lp->sl_prefprog = NULL;
@@ -2669,7 +2669,7 @@ slang_clear(lp)
vim_free(lp->sl_midword);
lp->sl_midword = NULL;
vim_free(lp->sl_compprog);
vim_regfree(lp->sl_compprog);
vim_free(lp->sl_comprules);
vim_free(lp->sl_compstartflags);
vim_free(lp->sl_compallflags);
@@ -5802,7 +5802,7 @@ spell_read_aff(spin, fname)
{
sprintf((char *)buf, "^%s",
aff_entry->ae_cond);
vim_free(aff_entry->ae_prog);
vim_regfree(aff_entry->ae_prog);
aff_entry->ae_prog = vim_regcomp(
buf, RE_MAGIC + RE_STRING);
}
@@ -6507,7 +6507,7 @@ spell_free_aff(aff)
--todo;
ah = HI2AH(hi);
for (ae = ah->ah_first; ae != NULL; ae = ae->ae_next)
vim_free(ae->ae_prog);
vim_regfree(ae->ae_prog);
}
}
if (ht == &aff->af_suff)
+7 -7
View File
@@ -3495,7 +3495,7 @@ syntax_clear(block)
block->b_syn_sync_maxlines = 0;
block->b_syn_sync_linebreaks = 0;
vim_free(block->b_syn_linecont_prog);
vim_regfree(block->b_syn_linecont_prog);
block->b_syn_linecont_prog = NULL;
vim_free(block->b_syn_linecont_pat);
block->b_syn_linecont_pat = NULL;
@@ -3544,7 +3544,7 @@ syntax_sync_clear()
curwin->w_s->b_syn_sync_maxlines = 0;
curwin->w_s->b_syn_sync_linebreaks = 0;
vim_free(curwin->w_s->b_syn_linecont_prog);
vim_regfree(curwin->w_s->b_syn_linecont_prog);
curwin->w_s->b_syn_linecont_prog = NULL;
vim_free(curwin->w_s->b_syn_linecont_pat);
curwin->w_s->b_syn_linecont_pat = NULL;
@@ -3583,7 +3583,7 @@ syn_clear_pattern(block, i)
int i;
{
vim_free(SYN_ITEMS(block)[i].sp_pattern);
vim_free(SYN_ITEMS(block)[i].sp_prog);
vim_regfree(SYN_ITEMS(block)[i].sp_prog);
/* Only free sp_cont_list and sp_next_list of first start pattern */
if (i == 0 || SYN_ITEMS(block)[i - 1].sp_type != SPTYPE_START)
{
@@ -4991,7 +4991,7 @@ syn_cmd_match(eap, syncing)
/*
* Something failed, free the allocated memory.
*/
vim_free(item.sp_prog);
vim_regfree(item.sp_prog);
vim_free(item.sp_pattern);
vim_free(syn_opt_arg.cont_list);
vim_free(syn_opt_arg.cont_in_list);
@@ -5248,7 +5248,7 @@ syn_cmd_region(eap, syncing)
{
if (!success)
{
vim_free(ppp->pp_synp->sp_prog);
vim_regfree(ppp->pp_synp->sp_prog);
vim_free(ppp->pp_synp->sp_pattern);
}
vim_free(ppp->pp_synp);
@@ -6022,7 +6022,7 @@ get_id_list(arg, keylen, list)
id = -1; /* remember that we found one */
}
}
vim_free(regmatch.regprog);
vim_regfree(regmatch.regprog);
}
}
vim_free(name);
@@ -6295,7 +6295,7 @@ ex_ownsyntax(eap)
curwin->w_p_spell = FALSE; /* No spell checking */
clear_string_option(&curwin->w_s->b_p_spc);
clear_string_option(&curwin->w_s->b_p_spf);
vim_free(curwin->w_s->b_cap_prog);
vim_regfree(curwin->w_s->b_cap_prog);
curwin->w_s->b_cap_prog = NULL;
clear_string_option(&curwin->w_s->b_p_spl);
#endif
+1 -1
View File
@@ -2491,7 +2491,7 @@ line_read_in:
findtag_end:
vim_free(lbuf);
vim_free(orgpat.regmatch.regprog);
vim_regfree(orgpat.regmatch.regprog);
vim_free(tag_fname);
#ifdef FEAT_EMACS_TAGS
vim_free(ebuf);
+1 -1
View File
@@ -77,5 +77,5 @@ clean:
-del X*
-del X*.*
-del test.ok
-rmdir /s /q Xfind
-rd /s /q Xfind
-if exist viminfo del viminfo
+8
View File
@@ -260,6 +260,8 @@ STARTTEST
:call add(tl, [2, '[^[:alpha:]]\+','abcccadfoij7787ysf287yrnccdu','7787'])
:call add(tl, [2, '[-a]', '-', '-'])
:call add(tl, [2, '[a-]', '-', '-'])
:call add(tl, [2, '[a-f]*\c','ABCDEFGH','ABCDEF'])
:call add(tl, [2, '[abc][xyz]\c','-af-AF-BY--','BY'])
:" filename regexp
:call add(tl, [2, '[-./[:alnum:]_~]\+', 'log13.file', 'log13.file'])
:" special chars
@@ -385,6 +387,12 @@ STARTTEST
:call add(tl, [2, '\(<<\)\@2<=span.', 'xxspanxxxx<spanxx<<spanyyy', 'spany', '<<'])
:call add(tl, [2, '\(foo\)\@<!bar.', 'xx foobar1 xbar2 xx', 'bar2'])
:"
:" look-behind match in front of a zero-width item
:call add(tl, [2, '\v\C%(<Last Changed:\s+)@<=.*$', '" test header'])
:call add(tl, [2, '\v\C%(<Last Changed:\s+)@<=.*$', '" Last Changed: 1970', '1970'])
:call add(tl, [2, '\(foo\)\@<=\>', 'foobar'])
:call add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo'])
:"
:""""" \@>
:call add(tl, [2, '\(a*\)\@>a', 'aaaa'])
:call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])
+18
View File
@@ -584,6 +584,12 @@ OK 2 - [-a]
OK 0 - [a-]
OK 1 - [a-]
OK 2 - [a-]
OK 0 - [a-f]*\c
OK 1 - [a-f]*\c
OK 2 - [a-f]*\c
OK 0 - [abc][xyz]\c
OK 1 - [abc][xyz]\c
OK 2 - [abc][xyz]\c
OK 0 - [-./[:alnum:]_~]\+
OK 1 - [-./[:alnum:]_~]\+
OK 2 - [-./[:alnum:]_~]\+
@@ -872,6 +878,18 @@ OK 2 - \(<<\)\@2<=span.
OK 0 - \(foo\)\@<!bar.
OK 1 - \(foo\)\@<!bar.
OK 2 - \(foo\)\@<!bar.
OK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
OK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
OK 0 - \(foo\)\@<=\>
OK 1 - \(foo\)\@<=\>
OK 2 - \(foo\)\@<=\>
OK 0 - \(foo\)\@<=\>
OK 1 - \(foo\)\@<=\>
OK 2 - \(foo\)\@<=\>
OK 0 - \(a*\)\@>a
OK 1 - \(a*\)\@>a
OK 2 - \(a*\)\@>a
+16
View File
@@ -743,6 +743,22 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1156,
/**/
1155,
/**/
1154,
/**/
1153,
/**/
1152,
/**/
1151,
/**/
1150,
/**/
1149,
/**/
1148,
/**/
+2 -2
View File
@@ -6828,7 +6828,7 @@ match_delete(wp, id, perr)
wp->w_match_head = cur->next;
else
prev->next = cur->next;
vim_free(cur->match.regprog);
vim_regfree(cur->match.regprog);
vim_free(cur->pattern);
vim_free(cur);
redraw_later(SOME_VALID);
@@ -6847,7 +6847,7 @@ clear_matches(wp)
while (wp->w_match_head != NULL)
{
m = wp->w_match_head->next;
vim_free(wp->w_match_head->match.regprog);
vim_regfree(wp->w_match_head->match.regprog);
vim_free(wp->w_match_head->pattern);
vim_free(wp->w_match_head);
wp->w_match_head = m;