• R/O
  • SSH

vim: Commit

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


Commit MetaInfo

Revision7fe13e0f5dce15cd16dd61c898e63899a9aff561 (tree)
Zeit2005-12-23 07:47:02
Autorvimboss
Commitervimboss

Log Message

updated for version 7.0175

Ändern Zusammenfassung

Diff

diff -r 0b1b7560c456 -r 7fe13e0f5dce runtime/autoload/netrw.vim
--- a/runtime/autoload/netrw.vim Mon Dec 19 22:15:59 2005 +0000
+++ b/runtime/autoload/netrw.vim Thu Dec 22 22:47:02 2005 +0000
@@ -1777,7 +1777,7 @@
17771777
17781778 " set up redirection
17791779 if &srr =~ "%s"
1780- let redir= substitute(&srr,"%s","/dev/null"."")
1780+ let redir= substitute(&srr,"%s","/dev/null","")
17811781 else
17821782 let redir= &srr . "/dev/null"
17831783 endif
diff -r 0b1b7560c456 -r 7fe13e0f5dce runtime/doc/eval.txt
--- a/runtime/doc/eval.txt Mon Dec 19 22:15:59 2005 +0000
+++ b/runtime/doc/eval.txt Thu Dec 22 22:47:02 2005 +0000
@@ -2206,6 +2206,8 @@
22062206 #group#event#pattern
22072207 autocommand defined for this group,
22082208 event and pattern.
2209+ ##event autocommand for this event is
2210+ supported.
22092211 For checking for a supported feature use |has()|.
22102212
22112213 Examples: >
@@ -2220,6 +2222,7 @@
22202222 exists("#filetypeindent")
22212223 exists("#filetypeindent#FileType")
22222224 exists("#filetypeindent#FileType#*")
2225+ exists("##ColorScheme")
22232226 < There must be no space between the symbol (&/$/*/#) and the
22242227 name.
22252228 Note that the argument must be a string, not the name of the
diff -r 0b1b7560c456 -r 7fe13e0f5dce runtime/doc/todo.txt
--- a/runtime/doc/todo.txt Mon Dec 19 22:15:59 2005 +0000
+++ b/runtime/doc/todo.txt Thu Dec 22 22:47:02 2005 +0000
@@ -1,4 +1,4 @@
1-*todo.txt* For Vim version 7.0aa. Last change: 2005 Dec 19
1+*todo.txt* For Vim version 7.0aa. Last change: 2005 Dec 22
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,6 +30,13 @@
3030 *known-bugs*
3131 -------------------- Known bugs and current work -----------------------
3232
33+ln -s b a
34+vim a
35+[insert some text]
36+:w
37+:sp b
38+[there are now two buffers for the same file and two swapfiles]
39+
3340 ccomplete:
3441 - When an option is set: In completion mode and the user types (identifier)
3542 characters, advance to the first match instead of removing the popup menu.
@@ -93,6 +100,9 @@
93100 Win32: Use the free downloadable compiler 7.1. Figure out how to do debugging
94101 (with Agide?) and describe it. (George Reilly)
95102 Try out using the free MS compiler and debugger, using Make_mvc.mak.
103+Try using Visual C++ Express 2005. (Ilya Bobir Dec 20)
104+ Disadvantage: Annoying warning messages, requires ..._NO_DEPRECATE, this
105+ is not a standard compiler.
96106
97107 Win32: Check that installer puts menu items in "all users" dir when possible,
98108 not administrator dir.
diff -r 0b1b7560c456 -r 7fe13e0f5dce runtime/doc/version7.txt
--- a/runtime/doc/version7.txt Mon Dec 19 22:15:59 2005 +0000
+++ b/runtime/doc/version7.txt Thu Dec 22 22:47:02 2005 +0000
@@ -1,4 +1,4 @@
1-*version7.txt* For Vim version 7.0aa. Last change: 2005 Dec 19
1+*version7.txt* For Vim version 7.0aa. Last change: 2005 Dec 20
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -916,8 +916,8 @@
916916 inserted after the CTRL-O. Allows using CTRL-O commands to move the cursor
917917 without losing the last inserted text.
918918
919-The exists() function now supports checking for autocmd group definition.
920-(Yegappan Lakshmanan)
919+The exists() function now supports checking for autocmd group definition
920+and for supported autocommands. (Yegappan Lakshmanan)
921921
922922 ==============================================================================
923923 COMPILE TIME CHANGES *compile-changes-7*
@@ -1509,4 +1509,7 @@
15091509 appear in the register. Now the CursorHold event is not triggered while
15101510 recording.
15111511
1512+Unix: the src/configure script used ${srcdir-.}, not all shells understand
1513+that. Use ${srcdir:-.} instead.
1514+
15121515 vim:tw=78:ts=8:ft=help:norl:
diff -r 0b1b7560c456 -r 7fe13e0f5dce runtime/spell/fo/main.aap
--- a/runtime/spell/fo/main.aap Mon Dec 19 22:15:59 2005 +0000
+++ b/runtime/spell/fo/main.aap Thu Dec 22 22:47:02 2005 +0000
@@ -16,8 +16,7 @@
1616 $VIM -u NONE -e -c "mkspell! $SPELLDIR/fo fo_FO" -c q
1717
1818 $SPELLDIR/fo.utf-8.spl : $FILES
19- :sys env LANG=fo_FO.UTF-8
20- $VIM -u NONE -e -c "mkspell! $SPELLDIR/fo fo_FO" -c q
19+ :sys $VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/fo fo_FO" -c q
2120
2221 ../README_fo.txt : README_fo_FO.txt Copyright
2322 :cat $source >! $target
diff -r 0b1b7560c456 -r 7fe13e0f5dce runtime/spell/gd/main.aap
--- a/runtime/spell/gd/main.aap Mon Dec 19 22:15:59 2005 +0000
+++ b/runtime/spell/gd/main.aap Thu Dec 22 22:47:02 2005 +0000
@@ -16,8 +16,7 @@
1616 $VIM -u NONE -e -c "mkspell! $SPELLDIR/gd gd_GB" -c q
1717
1818 $SPELLDIR/gd.utf-8.spl : $FILES
19- :sys env LANG=gd_GB.UTF-8
20- $VIM -u NONE -e -c "mkspell! $SPELLDIR/gd gd_GB" -c q
19+ :sys $VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/gd gd_GB" -c q
2120
2221 ../README_gd.txt : README_gd_GB.txt
2322 :copy $source $target
diff -r 0b1b7560c456 -r 7fe13e0f5dce runtime/spell/gl/main.aap
--- a/runtime/spell/gl/main.aap Mon Dec 19 22:15:59 2005 +0000
+++ b/runtime/spell/gl/main.aap Thu Dec 22 22:47:02 2005 +0000
@@ -12,11 +12,11 @@
1212 all: $SPELLDIR/gl.latin1.spl $SPELLDIR/gl.utf-8.spl ../README_gl.txt
1313
1414 $SPELLDIR/gl.latin1.spl : $FILES
15- :sys env LANG=gl_ES.ISO8859-1
15+ :sys env LANG=es_ES.ISO8859-1
1616 $VIM -u NONE -e -c "mkspell! $SPELLDIR/gl gl_ES" -c q
1717
1818 $SPELLDIR/gl.utf-8.spl : $FILES
19- :sys env LANG=gl_ES.UTF-8
19+ :sys env LANG=es_ES.UTF-8
2020 $VIM -u NONE -e -c "mkspell! $SPELLDIR/gl gl_ES" -c q
2121
2222 ../README_gl.txt : README_gl_ES.txt
diff -r 0b1b7560c456 -r 7fe13e0f5dce runtime/spell/tl/main.aap
--- a/runtime/spell/tl/main.aap Mon Dec 19 22:15:59 2005 +0000
+++ b/runtime/spell/tl/main.aap Thu Dec 22 22:47:02 2005 +0000
@@ -16,8 +16,7 @@
1616 $VIM -u NONE -e -c "mkspell! $SPELLDIR/tl tl_PH" -c q
1717
1818 $SPELLDIR/tl.utf-8.spl : $FILES
19- :sys env LANG=tl_PH.UTF-8
20- $VIM -u NONE -e -c "mkspell! $SPELLDIR/tl tl_PH" -c q
19+ :sys $VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/tl tl_PH" -c q
2120
2221 ../README_tl.txt : README_tl_PH.txt
2322 :copy $source $target
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/configure
--- a/src/configure Mon Dec 19 22:15:59 2005 +0000
+++ b/src/configure Thu Dec 22 22:47:02 2005 +0000
@@ -1,6 +1,6 @@
11 #! /bin/sh
22 # run the automatically generated configure script
33 CONFIG_STATUS=auto/config.status \
4- auto/configure "$@" --srcdir="${srcdir-.}" --cache-file=auto/config.cache
4+ auto/configure "$@" --srcdir="${srcdir:-.}" --cache-file=auto/config.cache
55 # Stupid autoconf 2.5x causes this file to be left behind.
66 if test -f configure.lineno; then rm -f configure.lineno; fi
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/edit.c
--- a/src/edit.c Mon Dec 19 22:15:59 2005 +0000
+++ b/src/edit.c Thu Dec 22 22:47:02 2005 +0000
@@ -5113,7 +5113,8 @@
51135113 * otherwise CTRL-O w and then <Left> will clear "last_insert".
51145114 */
51155115 ptr = get_inserted();
5116- if (did_restart_edit == 0 || (ptr != NULL && STRLEN(ptr) > new_insert_skip))
5116+ if (did_restart_edit == 0 || (ptr != NULL
5117+ && (int)STRLEN(ptr) > new_insert_skip))
51175118 {
51185119 vim_free(last_insert);
51195120 last_insert = ptr;
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/eval.c
--- a/src/eval.c Mon Dec 19 22:15:59 2005 +0000
+++ b/src/eval.c Thu Dec 22 22:47:02 2005 +0000
@@ -8459,7 +8459,10 @@
84598459 else if (*p == '#')
84608460 {
84618461 #ifdef FEAT_AUTOCMD
8462- n = au_exists(p + 1);
8462+ if (p[1] == '#')
8463+ n = autocmd_supported(p + 2);
8464+ else
8465+ n = au_exists(p + 1);
84638466 #endif
84648467 }
84658468 else /* internal variable */
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/fileio.c
--- a/src/fileio.c Mon Dec 19 22:15:59 2005 +0000
+++ b/src/fileio.c Thu Dec 22 22:47:02 2005 +0000
@@ -8827,6 +8827,18 @@
88278827 #endif /* FEAT_CMDL_COMPL */
88288828
88298829 /*
8830+ * Return TRUE if autocmd is supported.
8831+ */
8832+ int
8833+autocmd_supported(name)
8834+ char_u *name;
8835+{
8836+ char_u *p;
8837+
8838+ return (event_name2nr(name, &p) != NUM_EVENTS);
8839+}
8840+
8841+/*
88308842 * Return TRUE if an autocommand is defined for a group, event and
88318843 * pattern: The group can be omitted to accept any group. "event" and "pattern"
88328844 * can be NULL to accept any event and pattern. "pattern" can be NULL to accept
@@ -8852,11 +8864,11 @@
88528864 int group;
88538865 int retval = FALSE;
88548866
8855- /* Make a copy so that we can change the '#' to a NUL. */
8867+ /* Make a copy so that we can change the '#' chars to a NUL. */
88568868 arg_save = vim_strsave(arg);
88578869 if (arg_save == NULL)
88588870 return FALSE;
8859- p = vim_strchr(arg, '#');
8871+ p = vim_strchr(arg_save, '#');
88608872 if (p != NULL)
88618873 *p++ = NUL;
88628874
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/gui_w32.c
--- a/src/gui_w32.c Mon Dec 19 22:15:59 2005 +0000
+++ b/src/gui_w32.c Thu Dec 22 22:47:02 2005 +0000
@@ -2522,8 +2522,7 @@
25222522
25232523 #define add_string(s) strcpy((LPSTR)p, s); (LPSTR)p += (strlen((LPSTR)p) + 1)
25242524 #define add_word(x) *p++ = (x)
2525-#define add_byte(x) *((LPSTR)p)++ = (x)
2526-#define add_long(x) *((LPDWORD)p)++ = (x)
2525+#define add_long(x) dwp = (DWORD *)p; *dwp++ = (x); p = (WORD *)dwp
25272526
25282527 #if defined(FEAT_GUI_DIALOG) || defined(PROTO)
25292528 /*
@@ -2650,6 +2649,7 @@
26502649 char_u *textfield)
26512650 {
26522651 WORD *p, *pdlgtemplate, *pnumitems;
2652+ DWORD *dwp;
26532653 int numButtons;
26542654 int *buttonWidths, *buttonPositions;
26552655 int buttonYpos;
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/message.c
--- a/src/message.c Mon Dec 19 22:15:59 2005 +0000
+++ b/src/message.c Thu Dec 22 22:47:02 2005 +0000
@@ -722,6 +722,10 @@
722722 {
723723 int size = vim_strsize(s);
724724
725+ /* There may be room anyway when there are multibyte chars. */
726+ if (size <= room)
727+ return s;
728+
725729 for (n = 0; size >= room; )
726730 {
727731 size -= (*mb_ptr2cells)(s + n);
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/proto/fileio.pro
--- a/src/proto/fileio.pro Mon Dec 19 22:15:59 2005 +0000
+++ b/src/proto/fileio.pro Thu Dec 22 22:47:02 2005 +0000
@@ -41,6 +41,7 @@
4141 char_u *get_augroup_name __ARGS((expand_T *xp, int idx));
4242 char_u *set_context_in_autocmd __ARGS((expand_T *xp, char_u *arg, int doautocmd));
4343 char_u *get_event_name __ARGS((expand_T *xp, int idx));
44+int autocmd_supported __ARGS((char_u *name));
4445 int au_exists __ARGS((char_u *arg));
4546 int match_file_pat __ARGS((char_u *pattern, regprog_T *prog, char_u *fname, char_u *sfname, char_u *tail, int allow_dirs));
4647 int match_file_list __ARGS((char_u *list, char_u *sfname, char_u *ffname));
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/testdir/Make_amiga.mak
--- a/src/testdir/Make_amiga.mak Mon Dec 19 22:15:59 2005 +0000
+++ b/src/testdir/Make_amiga.mak Thu Dec 22 22:47:02 2005 +0000
@@ -24,7 +24,7 @@
2424 test38.out test39.out test40.out test41.out test42.out \
2525 test43.out test44.out test45.out test46.out test47.out \
2626 test48.out test51.out test53.out test54.out test55.out \
27- test56.out test57.out test58.out test59.out
27+ test56.out test57.out test58.out test59.out test60.out
2828
2929 .SUFFIXES: .in .out
3030
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/testdir/Make_dos.mak
--- a/src/testdir/Make_dos.mak Mon Dec 19 22:15:59 2005 +0000
+++ b/src/testdir/Make_dos.mak Thu Dec 22 22:47:02 2005 +0000
@@ -25,7 +25,7 @@
2525 test15.out test17.out test18.out test21.out test26.out \
2626 test30.out test31.out test32.out test33.out test34.out \
2727 test37.out test38.out test39.out test40.out test41.out \
28- test42.out test52.out
28+ test42.out test52.out test60.out
2929
3030 SCRIPTS32 = test50.out
3131
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/testdir/Make_os2.mak
--- a/src/testdir/Make_os2.mak Mon Dec 19 22:15:59 2005 +0000
+++ b/src/testdir/Make_os2.mak Thu Dec 22 22:47:02 2005 +0000
@@ -24,7 +24,7 @@
2424 test38.out test39.out test40.out test41.out test42.out \
2525 test43.out test44.out test45.out test46.out test47.out \
2626 test48.out test51.out test53.out test54.out test55.out \
27- test56.out test57.out test58.out test59.out
27+ test56.out test57.out test58.out test59.out test60.out
2828
2929 .SUFFIXES: .in .out
3030
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/testdir/Make_vms.mms
--- a/src/testdir/Make_vms.mms Mon Dec 19 22:15:59 2005 +0000
+++ b/src/testdir/Make_vms.mms Thu Dec 22 22:47:02 2005 +0000
@@ -58,7 +58,7 @@
5858 test38.out test39.out test40.out test41.out test42.out \
5959 test43.out test44.out test45.out test46.out \
6060 test48.out test51.out test53.out test54.out test55.out \
61- test56.out test57.out test58.out test59.out
61+ test56.out test57.out test58.out test59.out test60.out
6262
6363 .IFDEF WANT_GUI
6464 SCRIPT_GUI = test16.out
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/testdir/Makefile
--- a/src/testdir/Makefile Mon Dec 19 22:15:59 2005 +0000
+++ b/src/testdir/Makefile Thu Dec 22 22:47:02 2005 +0000
@@ -15,7 +15,7 @@
1515 test43.out test44.out test45.out test46.out test47.out \
1616 test48.out test49.out test51.out test52.out test53.out \
1717 test54.out test55.out test56.out test57.out test58.out \
18- test59.out
18+ test59.out test60.out
1919
2020 SCRIPTS_GUI = test16.out
2121
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/testdir/test60.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/testdir/test60.in Thu Dec 22 22:47:02 2005 +0000
@@ -0,0 +1,71 @@
1+Tests for the exists() function. vim: set ft=vim :
2+
3+STARTTEST
4+:so small.vim
5+:function! RunTest(str, result)
6+ if exists(a:str) == a:result
7+ echo "OK"
8+ else
9+ echo "FAILED: Checking for " . a:str
10+ endif
11+endfunction
12+:function! TestExists()
13+ augroup myagroup
14+ autocmd! BufEnter *.my echo 'myfile edited'
15+ augroup END
16+ redir! > test.out
17+
18+ " valid autocmd group
19+ call RunTest('#myagroup', 1)
20+
21+ " Valid autocmd group and event
22+ call RunTest('#myagroup#BufEnter', 1)
23+
24+ " Valid autocmd group, event and pattern
25+ call RunTest('#myagroup#BufEnter#*.my', 1)
26+
27+ " Valid autocmd event
28+ call RunTest('#BufEnter', 1)
29+
30+ " Valid autocmd event and pattern
31+ call RunTest('#BufEnter#*.my', 1)
32+
33+ " Non-existing autocmd group or event
34+ call RunTest('#xyzagroup', 0)
35+
36+ " Non-existing autocmd group and valid autocmd event
37+ call RunTest('#xyzagroup#BufEnter', 0)
38+
39+ " Valid autocmd group and autocmd event with no matching pattern
40+ call RunTest('#myagroup#CmdwinEnter', 0)
41+
42+ " Valid autocmd group and non-existing autocmd event
43+ call RunTest('#myagroup#xyzacmd', 0)
44+
45+ " Valid autocmd group and event and non-matching pattern
46+ call RunTest('#myagroup#BufEnter#xyzpat', 0)
47+
48+ " Valid autocmd event and non-matching pattern
49+ call RunTest('#BufEnter#xyzpat', 0)
50+
51+ " Empty autocmd group, event and pattern
52+ call RunTest('###', 0)
53+
54+ " Empty autocmd group and event or event and pattern
55+ call RunTest('##', 0)
56+
57+ " Testing support for event name that exists.
58+ call RunTest('##SwapExists', 1)
59+
60+ " Testing support for event name that doesn't exist.
61+ call RunTest('##SwapNotExists', 0)
62+
63+ redir END
64+endfunction
65+:call TestExists()
66+:edit! test.out
67+:set ff=unix
68+:w
69+:qa!
70+ENDTEST
71+
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/testdir/test60.ok
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/testdir/test60.ok Thu Dec 22 22:47:02 2005 +0000
@@ -0,0 +1,16 @@
1+
2+OK
3+OK
4+OK
5+OK
6+OK
7+OK
8+OK
9+OK
10+OK
11+OK
12+OK
13+OK
14+OK
15+OK
16+OK
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/version.c
--- a/src/version.c Mon Dec 19 22:15:59 2005 +0000
+++ b/src/version.c Thu Dec 22 22:47:02 2005 +0000
@@ -1082,7 +1082,7 @@
10821082
10831083 /* Show the sponsor and register message one out of four times, the Uganda
10841084 * message two out of four times. */
1085- sponsor = time(NULL);
1085+ sponsor = (int)time(NULL);
10861086 sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0);
10871087
10881088 /* start displaying the message lines after half of the blank lines */
diff -r 0b1b7560c456 -r 7fe13e0f5dce src/version.h
--- a/src/version.h Mon Dec 19 22:15:59 2005 +0000
+++ b/src/version.h Thu Dec 22 22:47:02 2005 +0000
@@ -36,5 +36,5 @@
3636 #define VIM_VERSION_NODOT "vim70aa"
3737 #define VIM_VERSION_SHORT "7.0aa"
3838 #define VIM_VERSION_MEDIUM "7.0aa ALPHA"
39-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Dec 19)"
40-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Dec 19, compiled "
39+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Dec 22)"
40+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Dec 22, compiled "
Show on old repository browser