To: vim_dev@googlegroups.com Subject: Patch 8.0.0218 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0218 Problem: No command line completion for :cexpr, :cgetexpr, :caddexpr, etc. Solution: Make completion work. (Yegappan Lakshmanan) Add a test. Files: src/ex_docmd.c, src/testdir/test_cmdline.vim *** ../vim-8.0.0217/src/ex_docmd.c 2017-01-13 21:59:59.323172116 +0100 --- src/ex_docmd.c 2017-01-22 16:42:17.871029279 +0100 *************** *** 4109,4114 **** --- 4109,4120 ---- case CMD_echoerr: case CMD_call: case CMD_return: + case CMD_cexpr: + case CMD_caddexpr: + case CMD_cgetexpr: + case CMD_lexpr: + case CMD_laddexpr: + case CMD_lgetexpr: set_context_for_expression(xp, arg, ea.cmdidx); break; *** ../vim-8.0.0217/src/testdir/test_cmdline.vim 2016-12-11 21:34:18.156065286 +0100 --- src/testdir/test_cmdline.vim 2017-01-22 16:45:14.337903166 +0100 *************** *** 25,30 **** --- 25,58 ---- set nowildmenu endfunc + func Test_expr_completion() + if !(has('cmdline_compl') && has('eval')) + return + endif + for cmd in [ + \ 'let a = ', + \ 'if', + \ 'elseif', + \ 'while', + \ 'for', + \ 'echo', + \ 'echon', + \ 'execute', + \ 'echomsg', + \ 'echoerr', + \ 'call', + \ 'return', + \ 'cexpr', + \ 'caddexpr', + \ 'cgetexpr', + \ 'lexpr', + \ 'laddexpr', + \ 'lgetexpr'] + call feedkeys(":" . cmd . " getl\\\"\", 'xt') + call assert_equal('"' . cmd . ' getline(', getreg(':')) + endfor + endfunc + func Test_getcompletion() if !has('cmdline_compl') return *** ../vim-8.0.0217/src/version.c 2017-01-22 16:13:30.534004680 +0100 --- src/version.c 2017-01-22 16:46:00.525608464 +0100 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 218, /**/ -- Not too long ago, unzipping in public was illegal... /// 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 ///