Mercurial > vim
comparison src/testdir/test_cmdline.vim @ 10660:715836a72361 v8.0.0220
patch 8.0.0220: completion of highlight names misses a few values
commit https://github.com/vim/vim/commit/15eedf1d621d980cb40f50cc6a78a09ab94388c7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 22 19:25:33 2017 +0100
patch 8.0.0220: completion of highlight names misses a few values
Problem: Completion for :match does not show "none" and other missing
highlight names.
Solution: Skip over cleared entries before checking the index to be at the
end.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 22 Jan 2017 19:30:03 +0100 |
parents | 4762bd300564 |
children | fa6c4825a1c4 |
comparison
equal
deleted
inserted
replaced
10659:6e900b249f71 | 10660:715836a72361 |
---|---|
23 call delete('Xtestfile1') | 23 call delete('Xtestfile1') |
24 call delete('Xtestfile2') | 24 call delete('Xtestfile2') |
25 set nowildmenu | 25 set nowildmenu |
26 endfunc | 26 endfunc |
27 | 27 |
28 func Test_match_completion() | |
29 if !has('cmdline_compl') | |
30 return | |
31 endif | |
32 hi Aardig ctermfg=green | |
33 call feedkeys(":match \<Tab>\<Home>\"\<CR>", 'xt') | |
34 call assert_equal('"match Aardig', getreg(':')) | |
35 call feedkeys(":match \<S-Tab>\<Home>\"\<CR>", 'xt') | |
36 call assert_equal('"match none', getreg(':')) | |
37 endfunc | |
38 | |
39 func Test_highlight_completion() | |
40 if !has('cmdline_compl') | |
41 return | |
42 endif | |
43 hi Aardig ctermfg=green | |
44 call feedkeys(":hi \<Tab>\<Home>\"\<CR>", 'xt') | |
45 call assert_equal('"hi Aardig', getreg(':')) | |
46 call feedkeys(":hi li\<S-Tab>\<Home>\"\<CR>", 'xt') | |
47 call assert_equal('"hi link', getreg(':')) | |
48 call feedkeys(":hi d\<S-Tab>\<Home>\"\<CR>", 'xt') | |
49 call assert_equal('"hi default', getreg(':')) | |
50 call feedkeys(":hi c\<S-Tab>\<Home>\"\<CR>", 'xt') | |
51 call assert_equal('"hi clear', getreg(':')) | |
52 endfunc | |
53 | |
28 func Test_expr_completion() | 54 func Test_expr_completion() |
29 if !(has('cmdline_compl') && has('eval')) | 55 if !has('cmdline_compl') |
30 return | 56 return |
31 endif | 57 endif |
32 for cmd in [ | 58 for cmd in [ |
33 \ 'let a = ', | 59 \ 'let a = ', |
34 \ 'if', | 60 \ 'if', |