coq_nvim icon indicating copy to clipboard operation
coq_nvim copied to clipboard

`'indentkeys'` causes glitch when inserting completion

Open zeertzjq opened this issue 4 years ago • 6 comments

With 'cindent' on, 'cinkeys' causes re-indenting of current line, if a key in 'cinkeys' is used to accept completion, it may cause a glitch.

zeertzjq avatar Oct 11 '21 04:10 zeertzjq

I think you should upload the example.

Shougo avatar Oct 11 '21 04:10 Shougo

IDK if unsetting 'cindent' in CompleteDone may work.

zeertzjq avatar Oct 11 '21 04:10 zeertzjq

I'm busy now, may upload an example several hours later.

zeertzjq avatar Oct 11 '21 04:10 zeertzjq

hey hey @zeertzjq please dont worry and take your time,

ive been super busy recently as well :)

cheers!

ms-jpq avatar Oct 11 '21 04:10 ms-jpq

https://user-images.githubusercontent.com/35768171/136749441-b8097ec5-512b-498c-b88a-31077bd1e106.mp4

The first time I press : to accept a case label completion, the : triggers re-indentation, and COQ fails to insert the completion and produces an error message start_col out of bounds. The second time the indentation doesn't change, and COQ successfully inserts the completion.

Besides disabling 'cindent', maybe applying the edits relative to extmarks can be another solution?

zeertzjq avatar Oct 11 '21 07:10 zeertzjq

I think this also applies to 'indentkeys'.

zeertzjq avatar Oct 22 '21 09:10 zeertzjq