]> granicus.if.org Git - vim/commitdiff
patch 7.4.844 v7.4.844
authorBram Moolenaar <Bram@vim.org>
Tue, 1 Sep 2015 14:05:00 +0000 (16:05 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 1 Sep 2015 14:05:00 +0000 (16:05 +0200)
Problem:    When '#' is in 'isident' the is# comparator doesn't work.
Solution:   Don't use vim_isIDc(). (Yasuhiro Matsumoto)

src/eval.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/test_comparators.in [new file with mode: 0644]
src/testdir/test_comparators.ok [new file with mode: 0644]
src/version.c

index 3650c34a9ba11e536a3e1c45985cbe0d5a681ac9..9a590c74911ed2c84fbb53dd339d41f16416a3b8 100644 (file)
@@ -4431,7 +4431,8 @@ eval4(arg, rettv, evaluate)
                    {
                        if (p[2] == 'n' && p[3] == 'o' && p[4] == 't')
                            len = 5;
-                       if (!vim_isIDc(p[len]))
+                       i = p[len];
+                       if (!isalnum(i) && i != '_')
                        {
                            type = len == 2 ? TYPE_EQUAL : TYPE_NEQUAL;
                            type_is = TRUE;
index 183a80986b224e7303d964594cb70d9753da5cc2..901a7c139a2437b04c952e8b61398c16becb1715 100644 (file)
@@ -45,6 +45,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
                test_charsearch.out \
                test_close_count.out \
                test_command_count.out \
+               test_comparators.out \
                test_erasebackword.out \
                test_eval.out \
                test_fixeol.out \
@@ -198,6 +199,7 @@ test_changelist.out: test_changelist.in
 test_charsearch.out: test_charsearch.in
 test_close_count.out: test_close_count.in
 test_command_count.out: test_command_count.in
+test_comparators.out: test_comparators.in
 test_erasebackword.out: test_erasebackword.in
 test_eval.out: test_eval.in
 test_increment.out: test_increment.in
index 0f9514c27e78630ee04f45de4c7610289f7b04ca..603f4a4118f1ae419eeb280a8d0a369f4a6ba25f 100644 (file)
@@ -44,6 +44,7 @@ SCRIPTS =     test3.out test4.out test5.out test6.out test7.out \
                test_charsearch.out \
                test_close_count.out \
                test_command_count.out \
+               test_comparators.out \
                test_erasebackword.out \
                test_eval.out \
                test_fixeol.out \
index 9ce78bf0479bce6754867ce5634c33246876e983..1b76bcc980e48d1ff9185d6218ebe1d5188443c9 100644 (file)
@@ -66,6 +66,7 @@ SCRIPTS =     test3.out test4.out test5.out test6.out test7.out \
                test_charsearch.out \
                test_close_count.out \
                test_command_count.out \
+               test_comparators.out \
                test_erasebackword.out \
                test_eval.out \
                test_fixeol.out \
index cac8f9c8d511aa2c205f4e5ee3f551bdb0db0dc1..08f78cb1e855289060b880aef4987e82b54767ee 100644 (file)
@@ -46,6 +46,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
                test_charsearch.out \
                test_close_count.out \
                test_command_count.out \
+               test_comparators.out \
                test_erasebackword.out \
                test_eval.out \
                test_fixeol.out \
index d90f59ab011ee0a7dfd3adc04553697877e55b60..6e77153883d19e962c7fcc003ae58b7c891f62b2 100644 (file)
@@ -4,7 +4,7 @@
 # Authors:     Zoltan Arpadffy, <arpadffy@polarhome.com>
 #              Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
 #
-# Last change:  2015 Aug 11
+# Last change:  2015 Sep 01
 #
 # 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.
@@ -105,6 +105,7 @@ SCRIPT = test1.out  test2.out  test3.out  test4.out  test5.out  \
         test_charsearch.out \
         test_close_count.out \
         test_command_count.out \
+        test_comparators.out \
         test_erasebackword.out \
         test_eval.out \
         test_fixeol.out \
index 7edebbe4eaad73a7fa6db47a2f1b23ca01897d1a..f29ec8b45558d16606fb8bcc02911639909962e7 100644 (file)
@@ -42,6 +42,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
                test_charsearch.out \
                test_close_count.out \
                test_command_count.out \
+               test_comparators.out \
                test_erasebackword.out \
                test_eval.out \
                test_fixeol.out \
diff --git a/src/testdir/test_comparators.in b/src/testdir/test_comparators.in
new file mode 100644 (file)
index 0000000..53a12a3
--- /dev/null
@@ -0,0 +1,21 @@
+" Test for expression comparators.   vim: set ft=vim :
+
+
+STARTTEST
+:so small.vim
+:try
+:  let oldisident=&isident
+:  set isident+=#
+:  if 1 is#1
+:    $put ='ok'
+:  else
+:    $put ='ng'
+:  endif
+:finally
+:  let &isident=oldisident
+:endtry
+:"
+:/^marker/+1,$wq! test.out
+ENDTEST
+
+marker
diff --git a/src/testdir/test_comparators.ok b/src/testdir/test_comparators.ok
new file mode 100644 (file)
index 0000000..9766475
--- /dev/null
@@ -0,0 +1 @@
+ok
index 215e03b9871695f9eb005dc178ede7133b197d64..dadec6a1eae50c5083f4ae4f62eb314e5a84fd9e 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    844,
 /**/
     843,
 /**/