zeertzjq
2c6469aca4
vim-patch:9.1.1933: completion: complete_match() is not useful ( #36726 )
...
Problem: completion: complete_match() Vim script function and
'isexpand' option are not that useful and confusing
(after v9.1.1341)
Solution: Remove function and option and clean up code and documentation
(Girish Palya).
complete_match() and 'isexpand' add no real functionality to Vim. They
duplicate what `strridx()` already does, yet pretend to be part of the
completion system. They have nothing to do with the completion mechanism.
* `f_complete_match()` in `insexpand.c` does not call any completion code.
It’s just a `STRNCMP()` wrapper with fluff logic.
* `'isexpand'` exists only as a proxy argument to that function.
It does nothing on its own and amounts to misuse of a new option.
The following Vim script function can be used to implement the same
functionality:
```vim
func CompleteMatch(triggers, sep=',')
let line = getline('.')->strpart(0, col('.') - 1)
let result = []
for trig in split(a:triggers, a:sep)
let idx = strridx(line, trig)
if l:idx >= 0
call add(result, [idx + 1, trig])
endif
endfor
return result
endfunc
```
related: vim/vim#16716
fixes : vim/vim#18563
closes : vim/vim#18790
cbcbff8712
Co-authored-by: Girish Palya <girishji@gmail.com >
2025-11-28 10:10:31 +08:00
..
2025-09-16 11:41:36 +08:00
2025-11-26 09:10:45 -08:00
2025-11-15 22:47:38 -05:00
2025-11-16 20:36:07 -08:00
2025-07-10 21:50:46 -04:00
2025-11-10 11:13:56 +08:00
2025-11-28 10:10:31 +08:00
2025-11-10 19:54:01 -08:00
2025-11-15 22:47:38 -05:00
2025-08-14 09:34:38 +02:00
2025-11-24 15:10:05 -08:00
2024-05-15 23:19:26 +02:00
2025-11-19 13:07:32 +00:00
2025-04-27 15:44:11 -07:00
2025-11-16 20:36:07 -08:00
2025-11-25 21:00:00 -08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-15 22:47:38 -05:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-09-07 20:45:22 -07:00
2025-05-03 10:08:53 -07:00
2025-05-03 10:08:53 -07:00
2023-06-25 17:14:28 +02:00
2025-10-27 23:45:14 +00:00
2025-09-07 20:45:22 -07:00
2025-10-13 08:53:21 +00:00
2025-04-27 10:32:25 -07:00
2025-11-16 00:55:28 -05:00
2025-11-16 00:55:28 -05:00
2025-11-10 11:13:56 +08:00
2025-10-13 08:53:21 +00:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-16 00:55:28 -05:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-24 17:10:50 -08:00
2025-08-02 15:58:11 -07:00
2025-09-15 12:36:44 -07:00
2025-11-17 12:47:29 +02:00
2025-11-20 12:33:02 +08:00
2025-05-03 10:08:53 -07:00
2025-06-14 17:24:36 +02:00
2025-11-15 22:47:38 -05:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-09-28 20:57:59 -07:00
2025-10-04 21:09:13 -07:00
2025-05-27 06:50:20 -07:00
2025-11-28 10:10:31 +08:00
2025-11-24 15:10:05 -08:00
2025-11-28 10:10:31 +08:00
2025-11-17 12:47:29 +02:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-05-03 10:08:53 -07:00
2025-11-10 11:13:56 +08:00
2023-01-01 15:05:13 +01:00
2025-08-11 00:04:30 +00:00
2025-05-20 00:21:30 +00:00
2025-10-07 00:08:22 +00:00
2025-11-23 20:03:13 -05:00
2025-11-10 11:13:56 +08:00
2025-11-15 11:21:19 +00:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-09 21:51:39 -08:00
2025-11-16 20:36:07 -08:00
2025-07-12 14:32:59 -07:00
2025-10-14 10:42:43 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-22 19:32:45 -05:00
2025-01-03 08:29:36 -08:00
2025-11-13 23:28:34 +00:00
2025-11-12 09:00:27 -08:00
2025-10-29 08:05:28 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-27 07:49:44 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-28 10:10:31 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-10 11:13:56 +08:00
2025-11-09 21:51:39 -08:00
2025-11-10 11:13:56 +08:00
2025-11-28 10:10:31 +08:00
2025-11-10 11:13:56 +08:00
2025-11-02 18:07:33 +08:00
2025-11-26 09:10:45 -08:00