mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
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:

committed by
Justin M. Keyes

parent
5f54519b4f
commit
560a346d57
@@ -3580,9 +3580,10 @@ static int eval4(char_u **arg, typval_T *rettv, int evaluate)
|
|||||||
type = TYPE_SEQUAL;
|
type = TYPE_SEQUAL;
|
||||||
break;
|
break;
|
||||||
case 'i': if (p[1] == 's') {
|
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;
|
len = 5;
|
||||||
if (!vim_isIDc(p[len])) {
|
}
|
||||||
|
if (!isalnum(p[len]) && p[len] != '_') {
|
||||||
type = len == 2 ? TYPE_EQUAL : TYPE_NEQUAL;
|
type = len == 2 ? TYPE_EQUAL : TYPE_NEQUAL;
|
||||||
type_is = TRUE;
|
type_is = TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -444,7 +444,7 @@ static int included_patches[] = {
|
|||||||
// 847,
|
// 847,
|
||||||
// 846 NA
|
// 846 NA
|
||||||
// 845,
|
// 845,
|
||||||
// 844,
|
844,
|
||||||
843,
|
843,
|
||||||
// 842 NA
|
// 842 NA
|
||||||
// 841 NA
|
// 841 NA
|
||||||
|
14
test/functional/legacy/comparators_spec.lua
Normal file
14
test/functional/legacy/comparators_spec.lua
Normal 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)
|
Reference in New Issue
Block a user