vim-patch:7.4.844 #4228

Problem:    When '#' is in 'isident' the is# comparator doesn't work.
Solution:   Don't use vim_isIDc(). (Yasuhiro Matsumoto)

37a8de17d4
This commit is contained in:
Jurica Bradaric 2016-02-09 23:16:41 +01:00 committed by Justin M. Keyes
parent 5f54519b4f
commit 560a346d57
3 changed files with 18 additions and 3 deletions

View File

@ -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;
}

View File

@ -444,7 +444,7 @@ static int included_patches[] = {
// 847,
// 846 NA
// 845,
// 844,
844,
843,
// 842 NA
// 841 NA

View File

@ -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)