vim version: NVIM v0.5.0-nightly-438-g8c588246a
node version: v10.16.0
coc.nvim version: 0.0.78-d5471449bf
coc.nivm directory: /Users/chenguangzhou/.configrc/nvim/viml/plugins/coc.nvim
term: xterm-kitty
platform: darwin
Sometimes apply completeItem will delete the character after cursor.
We will close your issue when you don't provide minimal vimrc and we can't
reproduce it
Create file mini.vim with:
set nocompatible
set runtimepath^=/path/to/coc.nvim
filetype plugin indent on
syntax on
set hidden
Start (neo)vim with command: vim -u mini.vim
Operate vim.
Install coc-html extension or other extension will return completeItem with textEdit.
Step 1
open t.html, | is cursor.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script type="text/javascript" src="//g.alicdn.com/AWSC/AWSC/awsc.js"></script>
<title>Document</title>
</head>
<body>
<div|></div>
</body>
</html>
type with different speed <space> + cl and select class completeItem. Sometimes it will delete the character >. I have seen this issue with coc-angular, coc-html, coc-flutter extension. All this extension will return completeItem with insertTextFormat: 2 and with textEdit. I checkout the output channel it seems it will send two completionItem/resolve request for the same completeItem.
this log does not delete the character >
log1.log
this log delete the character >
log2.log
I guess the line used for applyEdits could be wrong when you type fast