mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07: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:
parent
5f54519b4f
commit
560a346d57
@ -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;
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ static int included_patches[] = {
|
||||
// 847,
|
||||
// 846 NA
|
||||
// 845,
|
||||
// 844,
|
||||
844,
|
||||
843,
|
||||
// 842 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)
|
Loading…
Reference in New Issue
Block a user