aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/eval.c5
-rw-r--r--src/nvim/version.c2
-rw-r--r--test/functional/legacy/comparators_spec.lua14
3 files changed, 18 insertions, 3 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 327d0bf637..ec085efc07 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -3580,9 +3580,10 @@ static int eval4(char_u **arg, typval_T *rettv, int evaluate)
type = TYPE_SEQUAL;
break;
case 'i': if (p[1] == 's') {
- if (p[2] == 'n' && p[3] == 'o' && p[4] == 't')
+ if (p[2] == 'n' && p[3] == 'o' && p[4] == 't') {
len = 5;
- if (!vim_isIDc(p[len])) {
+ }
+ if (!isalnum(p[len]) && p[len] != '_') {
type = len == 2 ? TYPE_EQUAL : TYPE_NEQUAL;
type_is = TRUE;
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 452f823539..ef38a9196f 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -444,7 +444,7 @@ static int included_patches[] = {
// 847,
// 846 NA
// 845,
- // 844,
+ 844,
843,
// 842 NA
// 841 NA
diff --git a/test/functional/legacy/comparators_spec.lua b/test/functional/legacy/comparators_spec.lua
new file mode 100644
index 0000000000..e3fa3eea23
--- /dev/null
+++ b/test/functional/legacy/comparators_spec.lua
@@ -0,0 +1,14 @@
+-- " Test for expression comparators.
+
+local helpers = require('test.functional.helpers')
+local clear, eq = helpers.clear, helpers.eq
+local eval, execute = helpers.eval, helpers.execute
+
+describe('comparators', function()
+ before_each(clear)
+
+ it('is working', function()
+ execute('set isident+=#')
+ eq(1, eval('1 is#1'))
+ end)
+end)