vim-patch:7.4.1994

Problem:    True-false test fails.
Solution:   Filter the dict to only keep the value that matters.

05e418d436
This commit is contained in:
James McCoy
2017-02-27 15:05:03 -05:00
parent f863b23fd9
commit 1fa6d95c67
2 changed files with 8 additions and 2 deletions

View File

@@ -91,8 +91,14 @@ func Test_true_false_arg()
call Try_arg_true_false('index(["a", "A"], "A", 0, %v%)', 1, 0)
function FilterMapArg(d)
if type(a:d) == type({})
return filter(a:d, 'v:key == "rhs"')
endif
return a:d
endfunction
call Try_arg_true_false('maparg("asdf", "i", %v%)', "", "asdff")
call Try_arg_true_false('maparg("asdf", "i", 1, %v%)', "asdff", {'silent': 0, 'noremap': 0, 'lhs': 'asdf', 'mode': '!', 'nowait': 0, 'expr': 0, 'sid': 3, 'rhs': 'asdff', 'buffer': 0})
call Try_arg_true_false('FilterMapArg(maparg("asdf", "i", 1, %v%))', "asdff", {'rhs': 'asdff'})
call Try_arg_true_false('hasmapto("asdf", "i", %v%)', 0, 1)

View File

@@ -446,7 +446,7 @@ static int included_patches[] = {
1997,
1996,
// 1995 NA
// 1994,
1994,
1993,
1992,
1991,