• R/O
  • SSH

vim: Commit

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


Commit MetaInfo

Revisiona81bc802c17ce7002b08d2e327136e3ac4d11d5a (tree)
Time2004-07-20 05:55:54
Authorvimboss
Commitervimboss

Log Message

updated for version 7.0011

Change Summary

Incremental Difference

diff -r 293621502c4d -r a81bc802c17c runtime/doc/eval.txt
--- a/runtime/doc/eval.txt Sun Jul 18 21:34:53 2004 +0000
+++ b/runtime/doc/eval.txt Mon Jul 19 20:55:54 2004 +0000
@@ -1,4 +1,4 @@
1-*eval.txt* For Vim version 7.0aa. Last change: 2004 Jul 18
1+*eval.txt* For Vim version 7.0aa. Last change: 2004 Jul 19
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -831,6 +831,8 @@
831831 exists( {expr}) Number TRUE if {expr} exists
832832 expand( {expr}) String expand special keywords in {expr}
833833 filereadable( {file}) Number TRUE if {file} is a readable file
834+findfile( {name}[, {path}[, {count}]])
835+ String Find fine {name} in {path}
834836 filewritable( {file}) Number TRUE if {file} is a writable file
835837 fnamemodify( {fname}, {mods}) String modify file name
836838 foldclosed( {lnum}) Number first line of fold at {lnum} if closed
@@ -879,12 +881,12 @@
879881 localtime() Number current time
880882 maparg( {name}[, {mode}]) String rhs of mapping {name} in mode {mode}
881883 mapcheck( {name}[, {mode}]) String check for mappings matching {name}
882-match( {expr}, {pat}[, {start}])
884+match( {expr}, {pat}[, {start}[, {count}]])
883885 Number position where {pat} matches in {expr}
884-matchend( {expr}, {pat}[, {start}])
886+matchend( {expr}, {pat}[, {start}[, {count}]])
885887 Number position where {pat} ends in {expr}
886-matchstr( {expr}, {pat}[, {start}])
887- String match of {pat} in {expr}
888+matchstr( {expr}, {pat}[, {start}[, {count}]])
889+ String {count}'th match of {pat} in {expr}
888890 mode() String current editing mode
889891 nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
890892 nr2char( {expr}) String single char with ASCII value {expr}
@@ -1412,6 +1414,23 @@
14121414 *file_readable()*
14131415 Obsolete name: file_readable().
14141416
1417+finddir({name}[, {path}[, {count}]]) *finddir()*
1418+ Find directory {name} in {path}.
1419+ If {path} is omitted or empty then 'path' is used.
1420+ If the optional {count} is given, find {count}'s occurrence of
1421+ {name} in {path}.
1422+ This is quite similar to the ex-command |:find|.
1423+ When the found directory is below the current directory a
1424+ relative path is returned. Otherwise a full path is returned.
1425+ Example: >
1426+ :echo findfile("tags.vim", ".;")
1427+< Searches from the current directory upwards until it finds
1428+ the file "tags.vim".
1429+ {only available when compiled with the +file_in_path feature}
1430+
1431+findfile({name}[, {path}[, {count}]]) *findfile()*
1432+ Just like |finddir()|, but find a file instead of a directory.
1433+
14151434 filewritable({file}) *filewritable()*
14161435 The result is a Number, which is 1 when a file with the
14171436 name {file} exists, and can be written. If {file} doesn't
@@ -2027,14 +2046,20 @@
20272046 < This avoids adding the "_vv" mapping when there already is a
20282047 mapping for "_v" or for "_vvv".
20292048
2030-match({expr}, {pat}[, {start}]) *match()*
2049+match({expr}, {pat}[, {start}[, {count}]]) *match()*
20312050 The result is a Number, which gives the index (byte offset) in
2032- {expr} where {pat} matches. A match at the first character
2033- returns zero. If there is no match -1 is returned. Example: >
2051+ {expr} where {pat} matches.
2052+ A match at the first character returns zero.
2053+ If there is no match -1 is returned.
2054+ Example: >
20342055 :echo match("testing", "ing")
20352056 < results in "4".
20362057 See |string-match| for how {pat} is used.
2037- If {start} is given, the search starts from index {start}.
2058+ When {count} is given use the {count}'th match. When a match
2059+ is found the search for the next one starts on character
2060+ further. Thus this example results in 1: >
2061+ echo match("testing", "..", 0, 2)
2062+< If {start} is given, the search starts from index {start}.
20382063 The result, however, is still the index counted from the
20392064 first character. Example: >
20402065 :echo match("testing", "ing", 2)
@@ -2050,7 +2075,7 @@
20502075 the pattern. 'smartcase' is NOT used. The matching is always
20512076 done like 'magic' is set and 'cpoptions' is empty.
20522077
2053-matchend({expr}, {pat}[, {start}]) *matchend()*
2078+matchend({expr}, {pat}[, {start}[, {count}]]) *matchend()*
20542079 Same as match(), but return the index of first character after
20552080 the match. Example: >
20562081 :echo matchend("testing", "ing")
@@ -2061,7 +2086,7 @@
20612086 :echo matchend("testing", "ing", 5)
20622087 < result is "-1".
20632088
2064-matchstr({expr}, {pat}[, {start}]) *matchstr()*
2089+matchstr({expr}, {pat}[, {start}[, {count}]]) *matchstr()*
20652090 Same as match(), but return the matched string. Example: >
20662091 :echo matchstr("testing", "ing")
20672092 < results in "ing".
diff -r 293621502c4d -r a81bc802c17c runtime/doc/os_mac.txt
--- a/runtime/doc/os_mac.txt Sun Jul 18 21:34:53 2004 +0000
+++ b/runtime/doc/os_mac.txt Mon Jul 19 20:55:54 2004 +0000
@@ -1,4 +1,4 @@
1-*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Jun 19
1+*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Jul 19
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -9,7 +9,7 @@
99 This file documents the particularities of the Macintosh version of Vim.
1010
1111 NOTE: This file is a bit outdated. You might find more useful info here:
12- http://macvim.swdev.org/
12+ http://macvim.org/
1313
1414 1. Filename Convention |mac-filename|
1515 2. .vimrc an .vim files |mac-vimfile|
diff -r 293621502c4d -r a81bc802c17c runtime/doc/tags
--- a/runtime/doc/tags Sun Jul 18 21:34:53 2004 +0000
+++ b/runtime/doc/tags Mon Jul 19 20:55:54 2004 +0000
@@ -4065,6 +4065,7 @@
40654065 builtin_terms term.txt /*builtin_terms*
40664066 byte-count editing.txt /*byte-count*
40674067 byte2line() eval.txt /*byte2line()*
4068+byteidx() eval.txt /*byteidx()*
40684069 bzip2 pi_gzip.txt /*bzip2*
40694070 c change.txt /*c*
40704071 c-syntax syntax.txt /*c-syntax*
@@ -4624,6 +4625,7 @@
46244625 filter change.txt /*filter*
46254626 find-manpage usr_12.txt /*find-manpage*
46264627 find-replace usr_10.txt /*find-replace*
4628+findfile() eval.txt /*findfile()*
46274629 fixed-5.1 version5.txt /*fixed-5.1*
46284630 fixed-5.2 version5.txt /*fixed-5.2*
46294631 fixed-5.3 version5.txt /*fixed-5.3*
diff -r 293621502c4d -r a81bc802c17c runtime/doc/todo.txt
--- a/runtime/doc/todo.txt Sun Jul 18 21:34:53 2004 +0000
+++ b/runtime/doc/todo.txt Mon Jul 19 20:55:54 2004 +0000
@@ -1,4 +1,4 @@
1-*todo.txt* For Vim version 7.0aa. Last change: 2004 Jul 18
1+*todo.txt* For Vim version 7.0aa. Last change: 2004 Jul 19
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -36,11 +36,6 @@
3636 For version 7.0:
3737 - Include many PATCHES:
3838 8 Add functions:
39- match({pat}, {string} [,start] [,count]) get index of count'th match
40- Patch by Ilya Sher, 2004 Jun 19
41- find() find file in 'path' (patch from Johannes
42- Zellner 2001 Dec 20)
43- Update 2004 Jun 16.
4439 realname() Get user name (first, last, full)
4540 user_fullname() patch by Nikolai Weibull, Nov
4641 3 2002)
diff -r 293621502c4d -r a81bc802c17c runtime/doc/version7.txt
--- a/runtime/doc/version7.txt Sun Jul 18 21:34:53 2004 +0000
+++ b/runtime/doc/version7.txt Mon Jul 19 20:55:54 2004 +0000
@@ -1,4 +1,4 @@
1-*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 18
1+*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 19
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -123,10 +123,13 @@
123123
124124 New functions: ~
125125
126+byteidx(expr, nr) |byteidx()| Index of a character. (Ilya Sher)
127+finddir(name) |finddir()| Find a directory in 'path'.
128+findfile(name) |findfile()| Find a file in 'path'. (Johannes
129+ Zellner)
126130 repeat(expr, count) |repeat()| Repeat "expr" "count" times.
127131 (Christophe Poucet)
128132 tr(expr, from, to) |tr()| Translate characters. (Ron Aaron)
129-byteidx(expr, nr) |byteidx()| Index of a character. (Ilya Sher)
130133
131134
132135 New autocommand events: ~
@@ -182,6 +185,8 @@
182185 - #\(, #\), #\[ and #\] are recognized as character literals
183186 - Lisp line comments (delimited by semicolon) are recognized
184187
188+Added the "count" argument to match(), matchend() and matchstr(). (Ilya Sher)
189+
185190 ==============================================================================
186191 COMPILE TIME CHANGES *compile-changes-7*
187192
diff -r 293621502c4d -r a81bc802c17c runtime/syntax/sql.vim
--- a/runtime/syntax/sql.vim Sun Jul 18 21:34:53 2004 +0000
+++ b/runtime/syntax/sql.vim Mon Jul 19 20:55:54 2004 +0000
@@ -1,7 +1,7 @@
11 " Vim syntax file
22 " Language: SQL, PL/SQL (Oracle 8i)
3-" Maintainer: Paul Moore <gustav@morpheus.demon.co.uk>
4-" Last Change: 2001 Apr 30
3+" Maintainer: Paul Moore <pf_moore AT yahoo.co.uk>
4+" Last Change: 2004 Jul 19
55
66 " For version 5.x: Clear all syntax items
77 " For version 6.x: Quit when a syntax file was already loaded
diff -r 293621502c4d -r a81bc802c17c runtime/syntax/wsh.vim
--- a/runtime/syntax/wsh.vim Sun Jul 18 21:34:53 2004 +0000
+++ b/runtime/syntax/wsh.vim Mon Jul 19 20:55:54 2004 +0000
@@ -1,6 +1,6 @@
11 " Vim syntax file
22 " Language: Windows Scripting Host
3-" Maintainer: Paul Moore <gustav@morpheus.demon.co.uk>
3+" Maintainer: Paul Moore <pf_moore AT yahoo.co.uk>
44 " Last Change: Fre, 24 Nov 2000 21:54:09 +0100
55
66 " This reuses the XML, VB and JavaScript syntax files. While VB is not
diff -r 293621502c4d -r a81bc802c17c src/Make_mvc.mak
--- a/src/Make_mvc.mak Sun Jul 18 21:34:53 2004 +0000
+++ b/src/Make_mvc.mak Mon Jul 19 20:55:54 2004 +0000
@@ -852,13 +852,17 @@
852852
853853 $(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL)
854854
855+# $CFLAGS may contain backslashes and double quotes, escape them both.
856+E0_CFLAGS = $(CFLAGS:\=\\)
857+E_CFLAGS = $(E0_CFLAGS:"=\")
858+
855859 auto/pathdef.c: auto
856860 @echo creating auto/pathdef.c
857861 @echo /* pathdef.c */ > auto\pathdef.c
858862 @echo #include "vim.h" >> auto\pathdef.c
859863 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> auto\pathdef.c
860864 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> auto\pathdef.c
861- @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(CFLAGS:\=\\)"; >> auto\pathdef.c
865+ @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> auto\pathdef.c
862866 @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> auto\pathdef.c
863867 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> auto\pathdef.c
864868 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> auto\pathdef.c
diff -r 293621502c4d -r a81bc802c17c src/eval.c
--- a/src/eval.c Sun Jul 18 21:34:53 2004 +0000
+++ b/src/eval.c Mon Jul 19 20:55:54 2004 +0000
@@ -279,6 +279,9 @@
279279 static void f_expand __ARGS((VAR argvars, VAR retvar));
280280 static void f_filereadable __ARGS((VAR argvars, VAR retvar));
281281 static void f_filewritable __ARGS((VAR argvars, VAR retvar));
282+static void f_finddir __ARGS((VAR argvars, VAR retvar));
283+static void f_findfile __ARGS((VAR argvars, VAR retvar));
284+static void f_findfilendir __ARGS((VAR argvars, VAR retvar, int dir));
282285 static void f_fnamemodify __ARGS((VAR argvars, VAR retvar));
283286 static void f_foldclosed __ARGS((VAR argvars, VAR retvar));
284287 static void f_foldclosedend __ARGS((VAR argvars, VAR retvar));
@@ -2836,6 +2839,8 @@
28362839 {"file_readable", 1, 1, f_filereadable}, /* obsolete */
28372840 {"filereadable", 1, 1, f_filereadable},
28382841 {"filewritable", 1, 1, f_filewritable},
2842+ {"finddir", 1, 3, f_finddir},
2843+ {"findfile", 1, 3, f_findfile},
28392844 {"fnamemodify", 2, 2, f_fnamemodify},
28402845 {"foldclosed", 1, 1, f_foldclosed},
28412846 {"foldclosedend", 1, 1, f_foldclosedend},
@@ -2886,9 +2891,9 @@
28862891 {"localtime", 0, 0, f_localtime},
28872892 {"maparg", 1, 2, f_maparg},
28882893 {"mapcheck", 1, 2, f_mapcheck},
2889- {"match", 2, 3, f_match},
2890- {"matchend", 2, 3, f_matchend},
2891- {"matchstr", 2, 3, f_matchstr},
2894+ {"match", 2, 4, f_match},
2895+ {"matchend", 2, 4, f_matchend},
2896+ {"matchstr", 2, 4, f_matchstr},
28922897 {"mode", 0, 0, f_mode},
28932898 {"nextnonblank", 1, 1, f_nextnonblank},
28942899 {"nr2char", 1, 1, f_nr2char},
@@ -4168,6 +4173,71 @@
41684173 }
41694174
41704175 /*
4176+ * "finddir({fname}[, {path}[, {count}]])" function
4177+ */
4178+ static void
4179+f_finddir(argvars, retvar)
4180+ VAR argvars;
4181+ VAR retvar;
4182+{
4183+ f_findfilendir(argvars, retvar, TRUE);
4184+}
4185+
4186+/*
4187+ * "findfile({fname}[, {path}[, {count}]])" function
4188+ */
4189+ static void
4190+f_findfile(argvars, retvar)
4191+ VAR argvars;
4192+ VAR retvar;
4193+{
4194+ f_findfilendir(argvars, retvar, FALSE);
4195+}
4196+
4197+ static void
4198+f_findfilendir(argvars, retvar, dir)
4199+ VAR argvars;
4200+ VAR retvar;
4201+ int dir;
4202+{
4203+#ifdef FEAT_SEARCHPATH
4204+ char_u *fname;
4205+ char_u *fresult = NULL;
4206+ char_u *path = *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path;
4207+ char_u *p;
4208+ char_u pathbuf[NUMBUFLEN];
4209+ int count = 1;
4210+ int first = TRUE;
4211+
4212+ fname = get_var_string(&argvars[0]);
4213+
4214+ if (argvars[1].var_type != VAR_UNKNOWN)
4215+ {
4216+ p = get_var_string_buf(&argvars[1], pathbuf);
4217+ if (*p != NUL)
4218+ path = p;
4219+
4220+ if (argvars[2].var_type != VAR_UNKNOWN)
4221+ count = get_var_number(&argvars[2]);
4222+ }
4223+
4224+ do
4225+ {
4226+ vim_free(fresult);
4227+ fresult = find_file_in_path_option(first ? fname : NULL,
4228+ first ? (int)STRLEN(fname) : 0,
4229+ 0, first, path, dir, NULL);
4230+ first = FALSE;
4231+ } while (--count > 0 && fresult != NULL);
4232+
4233+ retvar->var_val.var_string = fresult;
4234+#else
4235+ retvar->var_val.var_string = NULL;
4236+#endif
4237+ retvar->var_type = VAR_STRING;
4238+}
4239+
4240+/*
41714241 * "fnamemodify({fname}, {mods})" function
41724242 */
41734243 static void
@@ -5858,17 +5928,20 @@
58585928 int type;
58595929 {
58605930 char_u *str;
5931+ char_u *expr;
58615932 char_u *pat;
58625933 regmatch_T regmatch;
58635934 char_u patbuf[NUMBUFLEN];
58645935 char_u *save_cpo;
58655936 long start = 0;
5937+ long nth = 1;
5938+ int match;
58665939
58675940 /* Make 'cpoptions' empty, the 'l' flag should not be used here. */
58685941 save_cpo = p_cpo;
58695942 p_cpo = (char_u *)"";
58705943
5871- str = get_var_string(&argvars[0]);
5944+ expr = str = get_var_string(&argvars[0]);
58725945 pat = get_var_string_buf(&argvars[1], patbuf);
58735946
58745947 if (type == 2)
@@ -5887,13 +5960,30 @@
58875960 if (start > (long)STRLEN(str))
58885961 goto theend;
58895962 str += start;
5963+
5964+ if (argvars[3].var_type != VAR_UNKNOWN)
5965+ nth = get_var_number(&argvars[3]);
58905966 }
58915967
58925968 regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
58935969 if (regmatch.regprog != NULL)
58945970 {
58955971 regmatch.rm_ic = p_ic;
5896- if (vim_regexec_nl(&regmatch, str, (colnr_T)0))
5972+
5973+ while (1)
5974+ {
5975+ match = vim_regexec_nl(&regmatch, str, (colnr_T)0);
5976+ if (!match || --nth <= 0)
5977+ break;
5978+ /* Advance to just after the match. */
5979+#ifdef FEAT_MBYTE
5980+ str = regmatch.startp[0] + mb_ptr2len_check(regmatch.startp[0]);
5981+#else
5982+ str = regmatch.startp[0] + 1;
5983+#endif
5984+ }
5985+
5986+ if (match)
58975987 {
58985988 if (type == 2)
58995989 retvar->var_val.var_string = vim_strnsave(regmatch.startp[0],
@@ -5906,7 +5996,7 @@
59065996 else
59075997 retvar->var_val.var_number =
59085998 (varnumber_T)(regmatch.endp[0] - str);
5909- retvar->var_val.var_number += start;
5999+ retvar->var_val.var_number += str - expr;
59106000 }
59116001 }
59126002 vim_free(regmatch.regprog);
diff -r 293621502c4d -r a81bc802c17c src/gui_mac.c
--- a/src/gui_mac.c Sun Jul 18 21:34:53 2004 +0000
+++ b/src/gui_mac.c Mon Jul 19 20:55:54 2004 +0000
@@ -4251,12 +4251,12 @@
42514251 {
42524252
42534253 Handle textOfClip;
4254+ int flavor = 0;
42544255 #ifdef USE_CARBONIZED
42554256 Size scrapSize;
42564257 ScrapFlavorFlags scrapFlags;
42574258 ScrapRef scrap = nil;
42584259 OSStatus error;
4259- int flavor;
42604260 #else
42614261 long scrapOffset;
42624262 long scrapSize;
@@ -4271,7 +4271,6 @@
42714271 if (error != noErr)
42724272 return;
42734273
4274- flavor = 0;
42754274 error = GetScrapFlavorFlags(scrap, VIMSCRAPFLAVOR, &scrapFlags);
42764275 if (error == noErr)
42774276 {
@@ -4315,15 +4314,16 @@
43154314 #else
43164315 scrapSize = GetScrap(textOfClip, 'TEXT', &scrapOffset);
43174316 #endif
4317+ scrapSize -= flavor;
43184318
43194319 if (flavor)
43204320 type = **textOfClip;
43214321 else
43224322 type = (strchr(*textOfClip, '\r') != NULL) ? MLINE : MCHAR;
43234323
4324- tempclip = lalloc(scrapSize+1, TRUE);
4325- STRNCPY(tempclip, *textOfClip + flavor, scrapSize - flavor);
4326- tempclip[scrapSize - flavor] = 0;
4324+ tempclip = lalloc(scrapSize + 1, TRUE);
4325+ STRNCPY(tempclip, *textOfClip + flavor, scrapSize);
4326+ tempclip[scrapSize] = 0;
43274327
43284328 searchCR = (char *)tempclip;
43294329 while (searchCR != NULL)
diff -r 293621502c4d -r a81bc802c17c src/misc2.c
--- a/src/misc2.c Sun Jul 18 21:34:53 2004 +0000
+++ b/src/misc2.c Mon Jul 19 20:55:54 2004 +0000
@@ -3457,10 +3457,6 @@
34573457 static int ff_path_in_stoplist __ARGS((char_u *, int, char_u **));
34583458 #endif
34593459
3460-#ifdef FEAT_SEARCHPATH
3461-static char_u *find_file_in_path_option __ARGS((char_u *ptr, int len, int options, int first, char_u *path_option, int need_dir, char_u *rel_fname));
3462-#endif
3463-
34643460 #if 0
34653461 /*
34663462 * if someone likes findfirst/findnext, here are the functions
@@ -4860,7 +4856,7 @@
48604856 TRUE, rel_fname);
48614857 }
48624858
4863- static char_u *
4859+ char_u *
48644860 find_file_in_path_option(ptr, len, options, first, path_option, need_dir, rel_fname)
48654861 char_u *ptr; /* file name */
48664862 int len; /* length of file name */
diff -r 293621502c4d -r a81bc802c17c src/proto/misc2.pro
--- a/src/proto/misc2.pro Sun Jul 18 21:34:53 2004 +0000
+++ b/src/proto/misc2.pro Mon Jul 19 20:55:54 2004 +0000
@@ -82,6 +82,7 @@
8282 void vim_findfile_free_visited __ARGS((void *search_ctx));
8383 char_u *find_file_in_path __ARGS((char_u *ptr, int len, int options, int first, char_u *rel_fname));
8484 char_u *find_directory_in_path __ARGS((char_u *ptr, int len, int options, char_u *rel_fname));
85+char_u *find_file_in_path_option __ARGS((char_u *ptr, int len, int options, int first, char_u *path_option, int need_dir, char_u *rel_fname));
8586 int vim_chdir __ARGS((char_u *new_dir));
8687 int get_user_name __ARGS((char_u *buf, int len));
8788 void sort_strings __ARGS((char_u **files, int count));
diff -r 293621502c4d -r a81bc802c17c src/testdir/Makefile
--- a/src/testdir/Makefile Sun Jul 18 21:34:53 2004 +0000
+++ b/src/testdir/Makefile Mon Jul 19 20:55:54 2004 +0000
@@ -32,7 +32,7 @@
3232 $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
3333
3434 clean:
35- -rm -rf *.out *.rej *.orig test.log tiny.vim small.vim mbyte.vim test.ok X* viminfo
35+ -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim test.ok X* viminfo
3636
3737 test1.out: test1.in
3838 -rm -f $*.failed tiny.vim small.vim mbyte.vim test.ok X* viminfo
diff -r 293621502c4d -r a81bc802c17c src/testdir/test37.in
--- a/src/testdir/test37.in Sun Jul 18 21:34:53 2004 +0000
+++ b/src/testdir/test37.in Mon Jul 19 20:55:54 2004 +0000
@@ -1,4 +1,4 @@
1-Test for 'scrollbind'. <eralston@computer.org>
1+Test for 'scrollbind'. <eralston@computer.org> Do not add a line below!
22 STARTTEST
33 :so small.vim
44 :set noscrollbind
diff -r 293621502c4d -r a81bc802c17c src/testdir/test44.in
--- a/src/testdir/test44.in Sun Jul 18 21:34:53 2004 +0000
+++ b/src/testdir/test44.in Mon Jul 19 20:55:54 2004 +0000
@@ -1,4 +1,5 @@
11 Tests for regexp with multi-byte encoding and various magic settings.
2+Test matchstr() with a count and multi-byte chars.
23
34 STARTTEST
45 :so mbyte.vim
@@ -21,6 +22,12 @@
2122 x:" find word by change of word class
2223 /ち\<カヨ\>は
2324 x:?^1?,$w! test.out
25+:e! test.out
26+G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב
27+:put =matchstr(\"אבגד\", \"..\", 0, 2) " בג
28+:put =matchstr(\"אבגד\", \".\", 0, 0) " א
29+:put =matchstr(\"אבגד\", \".\", 4, -1) " ג
30+:w!
2431 :qa!
2532 ENDTEST
2633
diff -r 293621502c4d -r a81bc802c17c src/testdir/test44.ok
--- a/src/testdir/test44.ok Sun Jul 18 21:34:53 2004 +0000
+++ b/src/testdir/test44.ok Mon Jul 19 20:55:54 2004 +0000
@@ -9,3 +9,7 @@
99 9 หม่x อx
1010 a อมx หx
1111 b カヨは
12
13+בג
14
15
diff -r 293621502c4d -r a81bc802c17c src/testdir/test53.in
--- a/src/testdir/test53.in Sun Jul 18 21:34:53 2004 +0000
+++ b/src/testdir/test53.in Mon Jul 19 20:55:54 2004 +0000
@@ -1,5 +1,9 @@
11 Tests for string text objects. vim: set ft=vim :
22
3+Note that the end-of-line moves the cursor to the next test line.
4+
5+Also test match() and matchstr()
6+
37 STARTTEST
48 :so small.vim
59 /^start:/
@@ -11,6 +15,12 @@
1115 :set quoteescape=+*-
1216 di`
1317 $F"va"oha"i"rz
18+k:put =matchstr(\"abcd\", \".\", 0, 2) " b
19+:put =matchstr(\"abcd\", \"..\", 0, 2) " bc
20+:put =matchstr(\"abcd\", \".\", 2, 0) " c (zero and negative -> first match)
21+:put =matchstr(\"abcd\", \".\", 0, -1) " a
22+:put =match(\"abcd\", \".\", 0, 5) " -1
23+:put =match(\"abcd\", \".\", 0, -1) " 0
1424 :/^start:/,/^end:/wq! test.out
1525 ENDTEST
1626
diff -r 293621502c4d -r a81bc802c17c src/testdir/test53.ok
--- a/src/testdir/test53.ok Sun Jul 18 21:34:53 2004 +0000
+++ b/src/testdir/test53.ok Mon Jul 19 20:55:54 2004 +0000
@@ -5,4 +5,10 @@
55 "'" 'blah'yyyyy'buh'
66 bla `` b`la
77 voo "zzzzzzzzzzzzzzzzzzzzzzzzzzzzsd
8+b
9+bc
10+c
11+a
12+-1
13+0
814 end:
Show on old repository browser