patch 9.1.1389: completion: still some issue when 'isexpand' contains a space
Problem: Cannot get completion startcol when space is not the first
trigger character (after v9.1.1383)
Solution: Detect the next comma followed by a space in the option string
and use in next compare loop (glepnir)
closes: #17311
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim
index 741cc9d..8bce0e4 100644
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -4507,6 +4507,13 @@
set ise=\ ,=
call feedkeys("Sif true \<ESC>:let g:result=complete_match()\<CR>", 'tx')
call assert_equal([[8, ' ']], g:result)
+ call feedkeys("Slet a = \<ESC>:let g:result=complete_match()\<CR>", 'tx')
+ call assert_equal([[7, '=']], g:result)
+ set ise={,\ ,=
+ call feedkeys("Sif true \<ESC>:let g:result=complete_match()\<CR>", 'tx')
+ call assert_equal([[8, ' ']], g:result)
+ call feedkeys("S{ \<ESC>:let g:result=complete_match()\<CR>", 'tx')
+ call assert_equal([[1, '{']], g:result)
bw!
unlet g:result