diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-09-01 16:05:00 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-09-01 16:05:00 +0200 |
commit | 37a8de17d4dfd3d463960c38a204ce399c8e19d4 (patch) | |
tree | f88214eabbb07e30167198afec63d23284d03a9c /src | |
parent | d43f0951bca162d4491d57df9277b5dbc462944f (diff) | |
download | vim-git-37a8de17d4dfd3d463960c38a204ce399c8e19d4.tar.gz |
patch 7.4.844v7.4.844
Problem: When '#' is in 'isident' the is# comparator doesn't work.
Solution: Don't use vim_isIDc(). (Yasuhiro Matsumoto)
Diffstat (limited to 'src')
-rw-r--r-- | src/eval.c | 3 | ||||
-rw-r--r-- | src/testdir/Make_amiga.mak | 2 | ||||
-rw-r--r-- | src/testdir/Make_dos.mak | 1 | ||||
-rw-r--r-- | src/testdir/Make_ming.mak | 1 | ||||
-rw-r--r-- | src/testdir/Make_os2.mak | 1 | ||||
-rw-r--r-- | src/testdir/Make_vms.mms | 3 | ||||
-rw-r--r-- | src/testdir/Makefile | 1 | ||||
-rw-r--r-- | src/testdir/test_comparators.in | 21 | ||||
-rw-r--r-- | src/testdir/test_comparators.ok | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
10 files changed, 34 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index 3650c34a9..9a590c749 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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; diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak index 183a80986..901a7c139 100644 --- a/src/testdir/Make_amiga.mak +++ b/src/testdir/Make_amiga.mak @@ -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 diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak index 0f9514c27..603f4a411 100644 --- a/src/testdir/Make_dos.mak +++ b/src/testdir/Make_dos.mak @@ -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 \ diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak index 9ce78bf04..1b76bcc98 100644 --- a/src/testdir/Make_ming.mak +++ b/src/testdir/Make_ming.mak @@ -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 \ diff --git a/src/testdir/Make_os2.mak b/src/testdir/Make_os2.mak index cac8f9c8d..08f78cb1e 100644 --- a/src/testdir/Make_os2.mak +++ b/src/testdir/Make_os2.mak @@ -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 \ diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms index d90f59ab0..6e7715388 100644 --- 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: 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 \ diff --git a/src/testdir/Makefile b/src/testdir/Makefile index 7edebbe4e..f29ec8b45 100644 --- a/src/testdir/Makefile +++ b/src/testdir/Makefile @@ -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 index 000000000..53a12a32e --- /dev/null +++ b/src/testdir/test_comparators.in @@ -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 index 000000000..9766475a4 --- /dev/null +++ b/src/testdir/test_comparators.ok @@ -0,0 +1 @@ +ok diff --git a/src/version.c b/src/version.c index 215e03b98..dadec6a1e 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 844, +/**/ 843, /**/ 842, |