To: vim_dev@googlegroups.com Subject: Patch 7.4.1994 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1994 (after 7.4.1993) Problem: True-false test fails. Solution: Filter the dict to only keep the value that matters. Files: src/testdir/test_true_false.vim *** ../vim-7.4.1993/src/testdir/test_true_false.vim 2016-07-07 15:11:15.984400787 +0200 --- src/testdir/test_true_false.vim 2016-07-07 16:33:26.175270722 +0200 *************** *** 91,98 **** call Try_arg_true_false('index(["a", "A"], "A", 0, %v%)', 1, 0) 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('hasmapto("asdf", "i", %v%)', 0, 1) --- 91,104 ---- 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('FilterMapArg(maparg("asdf", "i", 1, %v%))', "asdff", {'rhs': 'asdff'}) call Try_arg_true_false('hasmapto("asdf", "i", %v%)', 0, 1) *** ../vim-7.4.1993/src/version.c 2016-07-07 15:11:15.984400787 +0200 --- src/version.c 2016-07-07 16:34:49.642030950 +0200 *************** *** 760,761 **** --- 760,763 ---- { /* Add new patch number below this line */ + /**/ + 1994, /**/ -- Don't be humble ... you're not that great. -- Golda Meir /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///