Mercurial > vim
comparison src/testdir/test_ins_complete.vim @ 29000:7d28903e80df v8.2.5022
patch 8.2.5022: 'completefunc'/'omnifunc' error does not end completion
Commit: https://github.com/vim/vim/commit/9bcb9ca9c7dd1632385dc3351b5e019739368658
Author: LemonBoy <thatlemon@gmail.com>
Date: Thu May 26 15:23:26 2022 +0100
patch 8.2.5022: 'completefunc'/'omnifunc' error does not end completion
Problem: 'completefunc'/'omnifunc' error does not end completion.
Solution: Check if there was an error or exception. (closes https://github.com/vim/vim/issues/10486,
closes #4218)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 26 May 2022 16:30:02 +0200 |
parents | c1591fa6f81a |
children | 45c182c4f7e9 |
comparison
equal
deleted
inserted
replaced
28999:3ac43f48f001 | 29000:7d28903e80df |
---|---|
135 exe "normal Gofind -\<C-x>\<C-o>" | 135 exe "normal Gofind -\<C-x>\<C-o>" |
136 call assert_equal("find -help", getline('$')) | 136 call assert_equal("find -help", getline('$')) |
137 | 137 |
138 bwipe! | 138 bwipe! |
139 delfunc Omni | 139 delfunc Omni |
140 set omnifunc= | |
141 endfunc | |
142 | |
143 func Test_omni_throw() | |
144 let g:CallCount = 0 | |
145 func Omni(findstart, base) | |
146 let g:CallCount += 1 | |
147 if a:findstart | |
148 throw "he he he" | |
149 endif | |
150 endfunc | |
151 set omnifunc=Omni | |
152 new | |
153 try | |
154 exe "normal ifoo\<C-x>\<C-o>" | |
155 call assert_false(v:true, 'command should have failed') | |
156 catch | |
157 call assert_exception('he he he') | |
158 call assert_equal(1, g:CallCount) | |
159 endtry | |
160 | |
161 bwipe! | |
162 delfunc Omni | |
163 unlet g:CallCount | |
140 set omnifunc= | 164 set omnifunc= |
141 endfunc | 165 endfunc |
142 | 166 |
143 func Test_omni_autoload() | 167 func Test_omni_autoload() |
144 let save_rtp = &rtp | 168 let save_rtp = &rtp |