• R/O
  • SSH

vim: コミット

Mirror of the Vim source from https://github.com/vim/vim


コミットメタ情報

リビジョンcc4fe241baa3596ae9cd27ce65ad25077bfb2e71 (tree)
日時2008-01-19 23:59:58
作者vimboss
コミッターvimboss

ログメッセージ

updated for version 7.1-236

変更サマリ

差分

diff -r cd6175cc27d9 -r cc4fe241baa3 runtime/doc/options.txt
--- a/runtime/doc/options.txt Fri Jan 18 19:37:23 2008 +0000
+++ b/runtime/doc/options.txt Sat Jan 19 14:59:58 2008 +0000
@@ -3618,6 +3618,7 @@
36183618 When you get bored looking at the highlighted matches, you can turn it
36193619 off with |:nohlsearch|. As soon as you use a search command, the
36203620 highlighting comes back.
3621+ 'redrawtime' specifies the maximum time spend on finding matches.
36213622 When the search pattern can match an end-of-line, Vim will try to
36223623 highlight all of the matched text. However, this depends on where the
36233624 search starts. This will be the first line in the window or the first
@@ -3851,6 +3852,10 @@
38513852 original position when no match is found and when pressing <Esc>. You
38523853 still need to finish the search command with <Enter> to move the
38533854 cursor to the match.
3855+ When compiled with the |+reltime| feature Vim only searches for about
3856+ half a second. With a complicated pattern and/or a lot of text the
3857+ match may not be found. This is to avoid that Vim hangs while you
3858+ are typing the pattern.
38543859 The highlighting can be set with the 'i' flag in 'highlight'.
38553860 See also: 'hlsearch'.
38563861 CTRL-L can be used to add one character from after the current match
@@ -5185,6 +5190,18 @@
51855190 {not in Vi:} When using the ":view" command the 'readonly' option is
51865191 set for the newly edited buffer.
51875192
5193+ *'redrawtime'* *'rdt'*
5194+'redrawtime' 'rdt' number (default 2000)
5195+ global
5196+ {not in Vi}
5197+ {only available when compiled with the |+reltime|
5198+ feature}
5199+ The time in milliseconds for redrawing the display. This applies to
5200+ searching for patterns for 'hlsearch' and |:match| highlighting.
5201+ When redrawing takes more than this many milliseconds no further
5202+ matches will be highlighted. This is used to avoid that Vim hangs
5203+ when using a very complicated pattern.
5204+
51885205 *'remap'* *'noremap'*
51895206 'remap' boolean (default on)
51905207 global
diff -r cd6175cc27d9 -r cc4fe241baa3 src/ex_cmds.c
--- a/src/ex_cmds.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/ex_cmds.c Sat Jan 19 14:59:58 2008 +0000
@@ -4446,7 +4446,8 @@
44464446 #endif
44474447 ); ++lnum)
44484448 {
4449- nmatch = vim_regexec_multi(&regmatch, curwin, curbuf, lnum, (colnr_T)0);
4449+ nmatch = vim_regexec_multi(&regmatch, curwin, curbuf, lnum,
4450+ (colnr_T)0, NULL);
44504451 if (nmatch)
44514452 {
44524453 colnr_T copycol;
@@ -4957,7 +4958,8 @@
49574958 || (do_ask && !re_lookbehind(regmatch.regprog))
49584959 || nmatch_tl > 0
49594960 || (nmatch = vim_regexec_multi(&regmatch, curwin,
4960- curbuf, sub_firstlnum, matchcol)) == 0
4961+ curbuf, sub_firstlnum,
4962+ matchcol, NULL)) == 0
49614963 || regmatch.startpos[0].lnum > 0)
49624964 {
49634965 if (new_start != NULL)
@@ -5022,7 +5024,7 @@
50225024 }
50235025 if (nmatch == -1 && !lastone)
50245026 nmatch = vim_regexec_multi(&regmatch, curwin, curbuf,
5025- sub_firstlnum, matchcol);
5027+ sub_firstlnum, matchcol, NULL);
50265028
50275029 /*
50285030 * 5. break if there isn't another match in this line
@@ -5252,7 +5254,8 @@
52525254 for (lnum = eap->line1; lnum <= eap->line2 && !got_int; ++lnum)
52535255 {
52545256 /* a match on this line? */
5255- match = vim_regexec_multi(&regmatch, curwin, curbuf, lnum, (colnr_T)0);
5257+ match = vim_regexec_multi(&regmatch, curwin, curbuf, lnum,
5258+ (colnr_T)0, NULL);
52565259 if ((type == 'g' && match) || (type == 'v' && !match))
52575260 {
52585261 ml_setmarked(lnum);
diff -r cd6175cc27d9 -r cc4fe241baa3 src/ex_docmd.c
--- a/src/ex_docmd.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/ex_docmd.c Sat Jan 19 14:59:58 2008 +0000
@@ -3931,7 +3931,8 @@
39313931 curwin->w_cursor.col = 0;
39323932 searchcmdlen = 0;
39333933 if (!do_search(NULL, c, cmd, 1L,
3934- SEARCH_HIS + SEARCH_MSG + SEARCH_START))
3934+ SEARCH_HIS + SEARCH_MSG + SEARCH_START,
3935+ NULL))
39353936 {
39363937 curwin->w_cursor = pos;
39373938 cmd = NULL;
diff -r cd6175cc27d9 -r cc4fe241baa3 src/ex_getln.c
--- a/src/ex_getln.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/ex_getln.c Sat Jan 19 14:59:58 2008 +0000
@@ -1709,6 +1709,9 @@
17091709 if (p_is && !cmd_silent && (firstc == '/' || firstc == '?'))
17101710 {
17111711 pos_T end_pos;
1712+#ifdef FEAT_RELTIME
1713+ proftime_T tm;
1714+#endif
17121715
17131716 /* if there is a character waiting, search and redraw later */
17141717 if (char_avail())
@@ -1727,8 +1730,18 @@
17271730 cursor_off(); /* so the user knows we're busy */
17281731 out_flush();
17291732 ++emsg_off; /* So it doesn't beep if bad expr */
1733+#ifdef FEAT_RELTIME
1734+ /* Set the time limit to half a second. */
1735+ profile_setlimit(500L, &tm);
1736+#endif
17301737 i = do_search(NULL, firstc, ccline.cmdbuff, count,
1731- SEARCH_KEEP + SEARCH_OPT + SEARCH_NOOF + SEARCH_PEEK);
1738+ SEARCH_KEEP + SEARCH_OPT + SEARCH_NOOF + SEARCH_PEEK,
1739+#ifdef FEAT_RELTIME
1740+ &tm
1741+#else
1742+ NULL
1743+#endif
1744+ );
17321745 --emsg_off;
17331746 /* if interrupted while searching, behave like it failed */
17341747 if (got_int)
diff -r cd6175cc27d9 -r cc4fe241baa3 src/gui.c
--- a/src/gui.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/gui.c Sat Jan 19 14:59:58 2008 +0000
@@ -5052,7 +5052,7 @@
50525052 /* Search for the next match. */
50535053 i = msg_scroll;
50545054 do_search(NULL, down ? '/' : '?', ga.ga_data, 1L,
5055- SEARCH_MSG + SEARCH_MARK);
5055+ SEARCH_MSG + SEARCH_MARK, NULL);
50565056 msg_scroll = i; /* don't let an error message set msg_scroll */
50575057 }
50585058
diff -r cd6175cc27d9 -r cc4fe241baa3 src/misc1.c
--- a/src/misc1.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/misc1.c Sat Jan 19 14:59:58 2008 +0000
@@ -437,7 +437,8 @@
437437 {
438438 regmatch.rmm_ic = FALSE;
439439 regmatch.rmm_maxcol = 0;
440- if (vim_regexec_multi(&regmatch, curwin, curbuf, lnum, (colnr_T)0))
440+ if (vim_regexec_multi(&regmatch, curwin, curbuf, lnum,
441+ (colnr_T)0, NULL))
441442 {
442443 pos.lnum = regmatch.endpos[0].lnum + lnum;
443444 pos.col = regmatch.endpos[0].col;
diff -r cd6175cc27d9 -r cc4fe241baa3 src/normal.c
--- a/src/normal.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/normal.c Sat Jan 19 14:59:58 2008 +0000
@@ -6093,7 +6093,7 @@
60936093 curwin->w_set_curswant = TRUE;
60946094
60956095 i = do_search(cap->oap, dir, pat, cap->count1,
6096- opt | SEARCH_OPT | SEARCH_ECHO | SEARCH_MSG);
6096+ opt | SEARCH_OPT | SEARCH_ECHO | SEARCH_MSG, NULL);
60976097 if (i == 0)
60986098 clearop(cap->oap);
60996099 else
diff -r cd6175cc27d9 -r cc4fe241baa3 src/option.c
--- a/src/option.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/option.c Sat Jan 19 14:59:58 2008 +0000
@@ -1991,6 +1991,13 @@
19911991 {"redraw", NULL, P_BOOL|P_VI_DEF,
19921992 (char_u *)NULL, PV_NONE,
19931993 {(char_u *)FALSE, (char_u *)0L}},
1994+ {"redrawtime", "rdt", P_NUM|P_VI_DEF,
1995+#ifdef FEAT_RELTIME
1996+ (char_u *)&p_rdt, PV_NONE,
1997+#else
1998+ (char_u *)NULL, PV_NONE,
1999+#endif
2000+ {(char_u *)2000L, (char_u *)0L}},
19942001 {"remap", NULL, P_BOOL|P_VI_DEF,
19952002 (char_u *)&p_remap, PV_NONE,
19962003 {(char_u *)TRUE, (char_u *)0L}},
diff -r cd6175cc27d9 -r cc4fe241baa3 src/option.h
--- a/src/option.h Fri Jan 18 19:37:23 2008 +0000
+++ b/src/option.h Sat Jan 19 14:59:58 2008 +0000
@@ -633,6 +633,9 @@
633633 #ifdef FEAT_SEARCHPATH
634634 EXTERN char_u *p_cdpath; /* 'cdpath' */
635635 #endif
636+#ifdef FEAT_RELTIME
637+EXTERN long p_rdt; /* 'redrawtime' */
638+#endif
636639 EXTERN int p_remap; /* 'remap' */
637640 EXTERN long p_report; /* 'report' */
638641 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
diff -r cd6175cc27d9 -r cc4fe241baa3 src/proto/regexp.pro
--- a/src/proto/regexp.pro Fri Jan 18 19:37:23 2008 +0000
+++ b/src/proto/regexp.pro Sat Jan 19 14:59:58 2008 +0000
@@ -1,13 +1,13 @@
11 /* regexp.c */
2-void free_regexp_stuff __ARGS((void));
32 int re_multiline __ARGS((regprog_T *prog));
43 int re_lookbehind __ARGS((regprog_T *prog));
54 char_u *skip_regexp __ARGS((char_u *startp, int dirc, int magic, char_u **newp));
65 regprog_T *vim_regcomp __ARGS((char_u *expr, int re_flags));
76 int vim_regcomp_had_eol __ARGS((void));
7+void free_regexp_stuff __ARGS((void));
88 int vim_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
99 int vim_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col));
10-long vim_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col));
10+long vim_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm));
1111 reg_extmatch_T *ref_extmatch __ARGS((reg_extmatch_T *em));
1212 void unref_extmatch __ARGS((reg_extmatch_T *em));
1313 char_u *regtilde __ARGS((char_u *source, int magic));
diff -r cd6175cc27d9 -r cc4fe241baa3 src/proto/search.pro
--- a/src/proto/search.pro Fri Jan 18 19:37:23 2008 +0000
+++ b/src/proto/search.pro Sat Jan 19 14:59:58 2008 +0000
@@ -11,7 +11,7 @@
1111 void set_last_search_pat __ARGS((char_u *s, int idx, int magic, int setlast));
1212 void last_pat_prog __ARGS((regmmatch_T *regmatch));
1313 int searchit __ARGS((win_T *win, buf_T *buf, pos_T *pos, int dir, char_u *pat, long count, int options, int pat_use, linenr_T stop_lnum, proftime_T *tm));
14-int do_search __ARGS((oparg_T *oap, int dirc, char_u *pat, long count, int options));
14+int do_search __ARGS((oparg_T *oap, int dirc, char_u *pat, long count, int options, proftime_T *tm));
1515 int search_for_exact_line __ARGS((buf_T *buf, pos_T *pos, int dir, char_u *pat));
1616 int searchc __ARGS((cmdarg_T *cap, int t_cmd));
1717 pos_T *findmatch __ARGS((oparg_T *oap, int initc));
diff -r cd6175cc27d9 -r cc4fe241baa3 src/quickfix.c
--- a/src/quickfix.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/quickfix.c Sat Jan 19 14:59:58 2008 +0000
@@ -1803,7 +1803,8 @@
18031803 /* Move the cursor to the first line in the buffer */
18041804 save_cursor = curwin->w_cursor;
18051805 curwin->w_cursor.lnum = 0;
1806- if (!do_search(NULL, '/', qf_ptr->qf_pattern, (long)1, SEARCH_KEEP))
1806+ if (!do_search(NULL, '/', qf_ptr->qf_pattern, (long)1,
1807+ SEARCH_KEEP, NULL))
18071808 curwin->w_cursor = save_cursor;
18081809 }
18091810
@@ -3159,7 +3160,7 @@
31593160 {
31603161 col = 0;
31613162 while (vim_regexec_multi(&regmatch, curwin, buf, lnum,
3162- col) > 0)
3163+ col, NULL) > 0)
31633164 {
31643165 ;
31653166 if (qf_add_entry(qi, &prevp,
diff -r cd6175cc27d9 -r cc4fe241baa3 src/regexp.c
--- a/src/regexp.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/regexp.c Sat Jan 19 14:59:58 2008 +0000
@@ -3040,7 +3040,7 @@
30403040 } save_se_T;
30413041
30423042 static char_u *reg_getline __ARGS((linenr_T lnum));
3043-static long vim_regexec_both __ARGS((char_u *line, colnr_T col));
3043+static long vim_regexec_both __ARGS((char_u *line, colnr_T col, proftime_T *tm));
30443044 static long regtry __ARGS((regprog_T *prog, colnr_T col));
30453045 static void cleanup_subexpr __ARGS((void));
30463046 #ifdef FEAT_SYN_HL
@@ -3284,7 +3284,7 @@
32843284 ireg_icombine = FALSE;
32853285 #endif
32863286 ireg_maxcol = 0;
3287- return (vim_regexec_both(line, col) != 0);
3287+ return (vim_regexec_both(line, col, NULL) != 0);
32883288 }
32893289
32903290 #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
@@ -3308,7 +3308,7 @@
33083308 ireg_icombine = FALSE;
33093309 #endif
33103310 ireg_maxcol = 0;
3311- return (vim_regexec_both(line, col) != 0);
3311+ return (vim_regexec_both(line, col, NULL) != 0);
33123312 }
33133313 #endif
33143314
@@ -3321,12 +3321,13 @@
33213321 * match otherwise.
33223322 */
33233323 long
3324-vim_regexec_multi(rmp, win, buf, lnum, col)
3324+vim_regexec_multi(rmp, win, buf, lnum, col, tm)
33253325 regmmatch_T *rmp;
33263326 win_T *win; /* window in which to search or NULL */
33273327 buf_T *buf; /* buffer in which to search */
33283328 linenr_T lnum; /* nr of line to start looking for match */
33293329 colnr_T col; /* column to start looking for match */
3330+ proftime_T *tm; /* timeout limit or NULL */
33303331 {
33313332 long r;
33323333 buf_T *save_curbuf = curbuf;
@@ -3346,7 +3347,7 @@
33463347
33473348 /* Need to switch to buffer "buf" to make vim_iswordc() work. */
33483349 curbuf = buf;
3349- r = vim_regexec_both(NULL, col);
3350+ r = vim_regexec_both(NULL, col, tm);
33503351 curbuf = save_curbuf;
33513352
33523353 return r;
@@ -3356,10 +3357,12 @@
33563357 * Match a regexp against a string ("line" points to the string) or multiple
33573358 * lines ("line" is NULL, use reg_getline()).
33583359 */
3360+/*ARGSUSED*/
33593361 static long
3360-vim_regexec_both(line, col)
3362+vim_regexec_both(line, col, tm)
33613363 char_u *line;
33623364 colnr_T col; /* column to start looking for match */
3365+ proftime_T *tm; /* timeout limit or NULL */
33633366 {
33643367 regprog_T *prog;
33653368 char_u *s;
@@ -3502,6 +3505,9 @@
35023505 }
35033506 else
35043507 {
3508+#ifdef FEAT_RELTIME
3509+ int tm_count = 0;
3510+#endif
35053511 /* Messy cases: unanchored match. */
35063512 while (!got_int)
35073513 {
@@ -3550,6 +3556,15 @@
35503556 else
35513557 #endif
35523558 ++col;
3559+#ifdef FEAT_RELTIME
3560+ /* Check for timeout once in a twenty times to avoid overhead. */
3561+ if (tm != NULL && ++tm_count == 20)
3562+ {
3563+ tm_count = 0;
3564+ if (profile_passed_limit(tm))
3565+ break;
3566+ }
3567+#endif
35533568 }
35543569 }
35553570
diff -r cd6175cc27d9 -r cc4fe241baa3 src/screen.c
--- a/src/screen.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/screen.c Sat Jan 19 14:59:58 2008 +0000
@@ -848,11 +848,16 @@
848848 cur->hl.buf = buf;
849849 cur->hl.lnum = 0;
850850 cur->hl.first_lnum = 0;
851+# ifdef FEAT_RELTIME
852+ /* Set the time limit to 'redrawtime'. */
853+ profile_setlimit(p_rdt, &(cur->hl.tm));
854+# endif
851855 cur = cur->next;
852856 }
853857 search_hl.buf = buf;
854858 search_hl.lnum = 0;
855859 search_hl.first_lnum = 0;
860+ /* time limit is set at the toplevel, for all windows */
856861 #endif
857862
858863 #ifdef FEAT_LINEBREAK
@@ -6462,6 +6467,10 @@
64626467 {
64636468 last_pat_prog(&search_hl.rm);
64646469 search_hl.attr = hl_attr(HLF_L);
6470+# ifdef FEAT_RELTIME
6471+ /* Set the time limit to 'redrawtime'. */
6472+ profile_setlimit(p_rdt, &search_hl.tm);
6473+# endif
64656474 }
64666475 }
64676476
@@ -6587,6 +6596,14 @@
65876596 called_emsg = FALSE;
65886597 for (;;)
65896598 {
6599+#ifdef FEAT_RELTIME
6600+ /* Stop searching after passing the time limit. */
6601+ if (profile_passed_limit(&(shl->tm)))
6602+ {
6603+ shl->lnum = 0; /* no match found in time */
6604+ break;
6605+ }
6606+#endif
65906607 /* Three situations:
65916608 * 1. No useful previous match: search from start of line.
65926609 * 2. Not Vi compatible or empty match: continue at next character.
@@ -6620,7 +6637,13 @@
66206637 matchcol = shl->rm.endpos[0].col;
66216638
66226639 shl->lnum = lnum;
6623- nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol);
6640+ nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol,
6641+#ifdef FEAT_RELTIME
6642+ &(shl->tm)
6643+#else
6644+ NULL
6645+#endif
6646+ );
66246647 if (called_emsg)
66256648 {
66266649 /* Error while handling regexp: stop using this regexp. */
diff -r cd6175cc27d9 -r cc4fe241baa3 src/search.c
--- a/src/search.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/search.c Sat Jan 19 14:59:58 2008 +0000
@@ -606,7 +606,13 @@
606606 * Look for a match somewhere in line "lnum".
607607 */
608608 nmatched = vim_regexec_multi(&regmatch, win, buf,
609- lnum, (colnr_T)0);
609+ lnum, (colnr_T)0,
610+#ifdef FEAT_RELTIME
611+ tm
612+#else
613+ NULL
614+#endif
615+ );
610616 /* Abort searching on an error (e.g., out of stack). */
611617 if (called_emsg)
612618 break;
@@ -615,9 +621,9 @@
615621 /* match may actually be in another line when using \zs */
616622 matchpos = regmatch.startpos[0];
617623 endpos = regmatch.endpos[0];
618-# ifdef FEAT_EVAL
624+#ifdef FEAT_EVAL
619625 submatch = first_submatch(&regmatch);
620-# endif
626+#endif
621627 /* Line me be past end of buffer for "\n\zs". */
622628 if (lnum + matchpos.lnum > buf->b_ml.ml_line_count)
623629 ptr = (char_u *)"";
@@ -693,7 +699,13 @@
693699 if (ptr[matchcol] == NUL
694700 || (nmatched = vim_regexec_multi(&regmatch,
695701 win, buf, lnum + matchpos.lnum,
696- matchcol)) == 0)
702+ matchcol,
703+#ifdef FEAT_RELTIME
704+ tm
705+#else
706+ NULL
707+#endif
708+ )) == 0)
697709 {
698710 match_ok = FALSE;
699711 break;
@@ -799,7 +811,13 @@
799811 if (ptr[matchcol] == NUL
800812 || (nmatched = vim_regexec_multi(&regmatch,
801813 win, buf, lnum + matchpos.lnum,
802- matchcol)) == 0)
814+ matchcol,
815+#ifdef FEAT_RELTIME
816+ tm
817+#else
818+ NULL
819+#endif
820+ )) == 0)
803821 break;
804822
805823 /* Need to get the line pointer again, a
@@ -977,12 +995,13 @@
977995 * return 0 for failure, 1 for found, 2 for found and line offset added
978996 */
979997 int
980-do_search(oap, dirc, pat, count, options)
998+do_search(oap, dirc, pat, count, options, tm)
981999 oparg_T *oap; /* can be NULL */
9821000 int dirc; /* '/' or '?' */
9831001 char_u *pat;
9841002 long count;
9851003 int options;
1004+ proftime_T *tm; /* timeout limit or NULL */
9861005 {
9871006 pos_T pos; /* position of the last match */
9881007 char_u *searchstr;
@@ -1256,7 +1275,7 @@
12561275 (SEARCH_KEEP + SEARCH_PEEK + SEARCH_HIS
12571276 + SEARCH_MSG + SEARCH_START
12581277 + ((pat != NULL && *pat == ';') ? 0 : SEARCH_NOOF))),
1259- RE_LAST, (linenr_T)0, NULL);
1278+ RE_LAST, (linenr_T)0, tm);
12601279
12611280 if (dircp != NULL)
12621281 *dircp = dirc; /* restore second '/' or '?' for normal_cmd() */
diff -r cd6175cc27d9 -r cc4fe241baa3 src/spell.c
--- a/src/spell.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/spell.c Sat Jan 19 14:59:58 2008 +0000
@@ -10343,7 +10343,7 @@
1034310343 curwin->w_cursor.lnum = 0;
1034410344 while (!got_int)
1034510345 {
10346- if (do_search(NULL, '/', frompat, 1L, SEARCH_KEEP) == 0
10346+ if (do_search(NULL, '/', frompat, 1L, SEARCH_KEEP, NULL) == 0
1034710347 || u_save_cursor() == FAIL)
1034810348 break;
1034910349
diff -r cd6175cc27d9 -r cc4fe241baa3 src/structs.h
--- a/src/structs.h Fri Jan 18 19:37:23 2008 +0000
+++ b/src/structs.h Sat Jan 19 14:59:58 2008 +0000
@@ -1717,6 +1717,9 @@
17171717 linenr_T first_lnum; /* first lnum to search for multi-line pat */
17181718 colnr_T startcol; /* in win_line() points to char where HL starts */
17191719 colnr_T endcol; /* in win_line() points to char where HL ends */
1720+#ifdef FEAT_RELTIME
1721+ proftime_T tm; /* for a time limit */
1722+#endif
17201723 } match_T;
17211724
17221725 /*
diff -r cd6175cc27d9 -r cc4fe241baa3 src/syntax.c
--- a/src/syntax.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/syntax.c Sat Jan 19 14:59:58 2008 +0000
@@ -3097,7 +3097,7 @@
30973097 colnr_T col;
30983098 {
30993099 rmp->rmm_maxcol = syn_buf->b_p_smc;
3100- if (vim_regexec_multi(rmp, syn_win, syn_buf, lnum, col) > 0)
3100+ if (vim_regexec_multi(rmp, syn_win, syn_buf, lnum, col, NULL) > 0)
31013101 {
31023102 rmp->startpos[0].lnum += lnum;
31033103 rmp->endpos[0].lnum += lnum;
diff -r cd6175cc27d9 -r cc4fe241baa3 src/tag.c
--- a/src/tag.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/tag.c Sat Jan 19 14:59:58 2008 +0000
@@ -3191,7 +3191,8 @@
31913191 #endif
31923192 save_lnum = curwin->w_cursor.lnum;
31933193 curwin->w_cursor.lnum = 0; /* start search before first line */
3194- if (do_search(NULL, pbuf[0], pbuf + 1, (long)1, search_options))
3194+ if (do_search(NULL, pbuf[0], pbuf + 1, (long)1,
3195+ search_options, NULL))
31953196 retval = OK;
31963197 else
31973198 {
@@ -3203,7 +3204,7 @@
32033204 */
32043205 p_ic = TRUE;
32053206 if (!do_search(NULL, pbuf[0], pbuf + 1, (long)1,
3206- search_options))
3207+ search_options, NULL))
32073208 {
32083209 /*
32093210 * Failed to find pattern, take a guess: "^func ("
@@ -3213,13 +3214,14 @@
32133214 cc = *tagp.tagname_end;
32143215 *tagp.tagname_end = NUL;
32153216 sprintf((char *)pbuf, "^%s\\s\\*(", tagp.tagname);
3216- if (!do_search(NULL, '/', pbuf, (long)1, search_options))
3217+ if (!do_search(NULL, '/', pbuf, (long)1,
3218+ search_options, NULL))
32173219 {
32183220 /* Guess again: "^char * \<func (" */
32193221 sprintf((char *)pbuf, "^\\[#a-zA-Z_]\\.\\*\\<%s\\s\\*(",
32203222 tagp.tagname);
32213223 if (!do_search(NULL, '/', pbuf, (long)1,
3222- search_options))
3224+ search_options, NULL))
32233225 found = 0;
32243226 }
32253227 *tagp.tagname_end = cc;
diff -r cd6175cc27d9 -r cc4fe241baa3 src/version.c
--- a/src/version.c Fri Jan 18 19:37:23 2008 +0000
+++ b/src/version.c Sat Jan 19 14:59:58 2008 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 236,
671+/**/
670672 235,
671673 /**/
672674 234,
diff -r cd6175cc27d9 -r cc4fe241baa3 src/vim.h
--- a/src/vim.h Fri Jan 18 19:37:23 2008 +0000
+++ b/src/vim.h Sat Jan 19 14:59:58 2008 +0000
@@ -1550,6 +1550,16 @@
15501550 # define MB_MAXBYTES 21
15511551 #endif
15521552
1553+#if (defined(FEAT_PROFILE) || defined(FEAT_RELTIME)) && !defined(PROTO)
1554+# ifdef WIN3264
1555+typedef LARGE_INTEGER proftime_T;
1556+# else
1557+typedef struct timeval proftime_T;
1558+# endif
1559+#else
1560+typedef int proftime_T; /* dummy for function prototypes */
1561+#endif
1562+
15531563 /* Include option.h before structs.h, because the number of window-local and
15541564 * buffer-local options is used there. */
15551565 #include "option.h" /* options and default values */
@@ -1762,16 +1772,6 @@
17621772 # define stat(a,b) (access(a,0) ? -1 : stat(a,b))
17631773 #endif
17641774
1765-#if (defined(FEAT_PROFILE) || defined(FEAT_RELTIME)) && !defined(PROTO)
1766-# ifdef WIN3264
1767-typedef LARGE_INTEGER proftime_T;
1768-# else
1769-typedef struct timeval proftime_T;
1770-# endif
1771-#else
1772-typedef int proftime_T; /* dummy for function prototypes */
1773-#endif
1774-
17751775 #include "ex_cmds.h" /* Ex command defines */
17761776 #include "proto.h" /* function prototypes */
17771777
旧リポジトリブラウザで表示