changeset 5481:31217cc48e7d v7.4.090

updated for version 7.4.090 Problem: Win32: When a directory name contains an exclamation mark, completion doesn't complete the contents of the directory. Solution: Escape the exclamation mark. (Jan Stocker)
author Bram Moolenaar <bram@vim.org>
date Tue, 12 Nov 2013 05:28:26 +0100
parents 82ace7765f3a
children 168211560344
files src/ex_getln.c src/testdir/Make_amiga.mak src/testdir/Make_dos.mak src/testdir/Make_ming.mak src/testdir/Make_os2.mak src/testdir/Make_vms.mms src/testdir/Makefile src/testdir/test102.in src/testdir/test102.ok src/version.c
diffstat 10 files changed, 27 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -3852,9 +3852,9 @@ vim_strsave_fnameescape(fname, shell)
     char_u	buf[20];
     int		j = 0;
 
-    /* Don't escape '[' and '{' if they are in 'isfname'. */
+    /* Don't escape '[', '{' and '!' if they are in 'isfname'. */
     for (p = PATH_ESC_CHARS; *p != NUL; ++p)
-	if ((*p != '[' && *p != '{') || !vim_isfilec(*p))
+	if ((*p != '[' && *p != '{' && *p != '!') || !vim_isfilec(*p))
 	    buf[j++] = *p;
     buf[j] = NUL;
     p = vim_strsave_escaped(fname, buf);
--- a/src/testdir/Make_amiga.mak
+++ b/src/testdir/Make_amiga.mak
@@ -34,7 +34,7 @@ SCRIPTS = test1.out test3.out test4.out 
 		test81.out test82.out test83.out test84.out test88.out \
 		test89.out test90.out test91.out test92.out test93.out \
 		test94.out test95.out test96.out test97.out test98.out \
-		test99.out test100.out test101.out
+		test99.out test100.out test101.out test102.out
 
 .SUFFIXES: .in .out
 
@@ -152,3 +152,4 @@ test98.out: test98.in
 test99.out: test99.in
 test100.out: test100.in
 test101.out: test101.in
+test102.out: test102.in
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -33,7 +33,7 @@ SCRIPTS =	test3.out test4.out test5.out 
 		test84.out test85.out test86.out test87.out test88.out \
 		test89.out test90.out test91.out test92.out test93.out \
 		test94.out test95.out test96.out test98.out test99.out \
-		test100.out test101.out
+		test100.out test101.out test102.out
 
 SCRIPTS32 =	test50.out test70.out
 
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -53,7 +53,7 @@ SCRIPTS =	test3.out test4.out test5.out 
 		test84.out test85.out test86.out test87.out test88.out \
 		test89.out test90.out test91.out test92.out test93.out \
 		test94.out test95.out test96.out test98.out test99.out \
-		test100out test101.out
+		test100out test101.out test102.out
 
 SCRIPTS32 =	test50.out test70.out
 
--- a/src/testdir/Make_os2.mak
+++ b/src/testdir/Make_os2.mak
@@ -35,7 +35,7 @@ SCRIPTS = test1.out test3.out test4.out 
 		test81.out test82.out test83.out test84.out test88.out \
 		test89.out test90.out test91.out test92.out test93.out \
 		test94.out test95.out test96.out test98.out test99.out \
-		test100.out test101.out
+		test100.out test101.out test102.out
 
 .SUFFIXES: .in .out
 
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -4,7 +4,7 @@
 # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
 #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
 #
-# Last change:  2013 Nov 08
+# Last change:  2013 Nov 12
 #
 # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
 # Edit the lines in the Configuration section below to select.
@@ -79,7 +79,7 @@ SCRIPT = test1.out  test2.out  test3.out
 	 test82.out test83.out test84.out test88.out test89.out \
 	 test90.out test91.out test92.out test93.out test94.out \
 	 test95.out test96.out test97.out test98.out test99.out \
-	 test100.out test101.out
+	 test100.out test101.out test102.out
 
 # Known problems:
 # Test 30: a problem around mac format - unknown reason
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -30,7 +30,7 @@ SCRIPTS = test1.out test2.out test3.out 
 		test84.out test85.out test86.out test87.out test88.out \
 		test89.out test90.out test91.out test92.out test93.out \
 		test94.out test95.out test96.out test97.out test98.out \
-		test99.out test100.out test101.out
+		test99.out test100.out test101.out test102.out
 
 SCRIPTS_GUI = test16.out
 
new file mode 100644
--- /dev/null
+++ b/src/testdir/test102.in
@@ -0,0 +1,12 @@
+Test if fnameescape is correct for special chars like !
+
+STARTTEST
+:%d
+:let fname = 'Xspa ce'
+:try | exe "w! " . fnameescape(fname) | put='Space' | endtry 
+:let fname = 'Xemark!'
+:try | exe "w! " . fnameescape(fname) | put='ExclamationMark' | endtry
+:w! test.out
+:qa!
+ENDTEST
+
new file mode 100644
--- /dev/null
+++ b/src/testdir/test102.ok
@@ -0,0 +1,3 @@
+
+Space
+ExclamationMark
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    90,
+/**/
     89,
 /**/
     88,