To: vim_dev@googlegroups.com Subject: Patch 7.4.2162 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2162 Problem: Result of getcompletion('', 'sign') depends on previous completion. Solution: Call set_context_in_sign_cmd(). (Dominique Pelle) Files: src/evalfunc.c, src/testdir/test_cmdline.vim *** ../vim-7.4.2161/src/evalfunc.c 2016-08-05 22:22:02.555334919 +0200 --- src/evalfunc.c 2016-08-06 14:06:38.641476812 +0200 *************** *** 4247,4252 **** --- 4247,4259 ---- xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern); } #endif + #ifdef FEAT_SIGNS + if (xpc.xp_context == EXPAND_SIGN) + { + set_context_in_sign_cmd(&xpc, xpc.xp_pattern); + xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern); + } + #endif pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context); if ((rettv_list_alloc(rettv) != FAIL) && (pat != NULL)) *** ../vim-7.4.2161/src/testdir/test_cmdline.vim 2016-08-05 20:35:09.786315271 +0200 --- src/testdir/test_cmdline.vim 2016-08-06 14:06:05.709736235 +0200 *************** *** 138,143 **** --- 138,156 ---- call assert_equal(keys, l) endif + if has('signs') + sign define Testing linehl=Comment + let l = getcompletion('', 'sign') + let cmds = ['define', 'jump', 'list', 'place', 'undefine', 'unplace'] + call assert_equal(cmds, l) + " using cmdline completion must not change the result + call feedkeys(":sign list \\", 'xt') + let l = getcompletion('', 'sign') + call assert_equal(cmds, l) + let l = getcompletion('list ', 'sign') + call assert_equal(['Testing'], l) + endif + " For others test if the name is recognized. let names = ['buffer', 'environment', 'file_in_path', \ 'mapping', 'shellcmd', 'tag', 'tag_listfiles', 'user'] *************** *** 150,158 **** if has('profile') call add(names, 'syntime') endif - if has('signs') - call add(names, 'sign') - endif set tags=Xtags call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", "word\tfile\tcmd"], 'Xtags') --- 163,168 ---- *** ../vim-7.4.2161/src/version.c 2016-08-05 22:51:09.597156984 +0200 --- src/version.c 2016-08-06 14:08:16.360707046 +0200 *************** *** 765,766 **** --- 765,768 ---- { /* Add new patch number below this line */ + /**/ + 2162, /**/ -- ARTHUR: What are you going to do. bleed on me? "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///