Mercurial > vim
comparison src/testdir/test_popup.vim @ 34273:f4ae2a159bde v9.1.0075
patch 9.1.0075: insert completion not correct when adding new leader
Commit: https://github.com/vim/vim/commit/cbb46b439888e10f87baaca504eafd191723c44b
Author: glepnir <glephunter@gmail.com>
Date: Sat Feb 3 18:11:13 2024 +0100
patch 9.1.0075: insert completion not correct when adding new leader
Problem: insert completion not correct when adding new leader
Solution: Reset compl_curr_match to compl_shown_match
(glepnir)
closes: #13957
Co-authored-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 03 Feb 2024 18:30:03 +0100 |
parents | 695b50472e85 |
children | a059fc613d55 |
comparison
equal
deleted
inserted
replaced
34272:13a3a1d87512 | 34273:f4ae2a159bde |
---|---|
1157 call feedkeys("a\<C-N>\<C-N>\<C-N>\<C-N>\<C-E>", 'tx') | 1157 call feedkeys("a\<C-N>\<C-N>\<C-N>\<C-N>\<C-E>", 'tx') |
1158 call assert_equal(v:null, g:word) | 1158 call assert_equal(v:null, g:word) |
1159 call feedkeys("a\<C-N>\<C-N>\<C-N>\<C-N>\<C-P>", 'tx') | 1159 call feedkeys("a\<C-N>\<C-N>\<C-N>\<C-N>\<C-P>", 'tx') |
1160 call assert_equal('foobar', g:word) | 1160 call assert_equal('foobar', g:word) |
1161 | 1161 |
1162 func Omni_test(findstart, base) | |
1163 if a:findstart | |
1164 return col(".") | |
1165 endif | |
1166 return [#{word: "one"}, #{word: "two"}, #{word: "five"}] | |
1167 endfunc | |
1168 set omnifunc=Omni_test | |
1169 set completeopt=menu,menuone | |
1170 call feedkeys("i\<C-X>\<C-O>\<BS>\<BS>\<BS>f", 'tx') | |
1171 call assert_equal('five', g:word) | |
1172 | |
1162 autocmd! AAAAA_Group | 1173 autocmd! AAAAA_Group |
1163 set complete& completeopt& | 1174 set complete& completeopt& |
1164 delfunc! OnPumChange | 1175 delfunc! OnPumChange |
1176 delfunc! Omni_test | |
1165 bw! | 1177 bw! |
1166 endfunc | 1178 endfunc |
1167 | 1179 |
1168 func GetPumPosition() | 1180 func GetPumPosition() |
1169 call assert_true( pumvisible() ) | 1181 call assert_true( pumvisible() ) |