Fix error: "E118: Too many arguments for function: copy" (#249)

```text
Error detected while processing function <SNR>244_recompute_pum[44]..<SNR>244_default_preprocessor[18]..<SNR>244_strip_pair_characters:
line    7:
E118: Too many arguments for function: copy
```
This commit is contained in:
Jagua
2021-01-29 00:35:00 +09:00
committed by GitHub
parent e546095e4a
commit 4be3c16b33

View File

@@ -492,7 +492,7 @@ function! s:strip_pair_characters(base, item) abort
if has_key(s:pair, a:base[0])
let [l:lhs, l:rhs, l:str] = [a:base[0], s:pair[a:base[0]], l:item['word']]
if len(l:str) > 1 && l:str[0] ==# l:lhs && l:str[-1:] ==# l:rhs
let l:item = copy({}, l:item)
let l:item = extend({}, l:item)
let l:item['word'] = l:str[:-2]
endif
endif