Mercurial > vim
comparison src/testdir/test_cmdline.vim @ 9774:5385e72e1ac2 v7.4.2162
commit https://github.com/vim/vim/commit/7522f6982197f83a5c0f6e9af07fb713934f824a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 6 14:12:50 2016 +0200
patch 7.4.2162
Problem: Result of getcompletion('', 'sign') depends on previous
completion.
Solution: Call set_context_in_sign_cmd(). (Dominique Pelle)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 06 Aug 2016 14:15:04 +0200 |
parents | be9b5f8c3fd9 |
children | 74f67cb4f7e1 |
comparison
equal
deleted
inserted
replaced
9773:908a212d6d44 | 9774:5385e72e1ac2 |
---|---|
136 let keys = ['a', 'c', 'd', 'e', 'f', 'g', 'i', 's', 't'] | 136 let keys = ['a', 'c', 'd', 'e', 'f', 'g', 'i', 's', 't'] |
137 let l = getcompletion('find ', 'cscope') | 137 let l = getcompletion('find ', 'cscope') |
138 call assert_equal(keys, l) | 138 call assert_equal(keys, l) |
139 endif | 139 endif |
140 | 140 |
141 if has('signs') | |
142 sign define Testing linehl=Comment | |
143 let l = getcompletion('', 'sign') | |
144 let cmds = ['define', 'jump', 'list', 'place', 'undefine', 'unplace'] | |
145 call assert_equal(cmds, l) | |
146 " using cmdline completion must not change the result | |
147 call feedkeys(":sign list \<c-d>\<c-c>", 'xt') | |
148 let l = getcompletion('', 'sign') | |
149 call assert_equal(cmds, l) | |
150 let l = getcompletion('list ', 'sign') | |
151 call assert_equal(['Testing'], l) | |
152 endif | |
153 | |
141 " For others test if the name is recognized. | 154 " For others test if the name is recognized. |
142 let names = ['buffer', 'environment', 'file_in_path', | 155 let names = ['buffer', 'environment', 'file_in_path', |
143 \ 'mapping', 'shellcmd', 'tag', 'tag_listfiles', 'user'] | 156 \ 'mapping', 'shellcmd', 'tag', 'tag_listfiles', 'user'] |
144 if has('cmdline_hist') | 157 if has('cmdline_hist') |
145 call add(names, 'history') | 158 call add(names, 'history') |
147 if has('gettext') | 160 if has('gettext') |
148 call add(names, 'locale') | 161 call add(names, 'locale') |
149 endif | 162 endif |
150 if has('profile') | 163 if has('profile') |
151 call add(names, 'syntime') | 164 call add(names, 'syntime') |
152 endif | |
153 if has('signs') | |
154 call add(names, 'sign') | |
155 endif | 165 endif |
156 | 166 |
157 set tags=Xtags | 167 set tags=Xtags |
158 call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", "word\tfile\tcmd"], 'Xtags') | 168 call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", "word\tfile\tcmd"], 'Xtags') |
159 | 169 |