val-town / codemirror-codeium

Codeium code completion integration for CodeMirror 6
https://val-town.github.io/codemirror-codeium/
Other
53 stars 4 forks source link

ghostText is misplaced with multi-range completions #18

Closed tmcw closed 7 months ago

tmcw commented 7 months ago

https://github.com/val-town/codemirror-codeium/assets/32314/86137b1f-cd66-46c7-8354-3818cb1a0de0

In this video you can see how the () text is "real" and in the document, but the closing ) becomes ghosty when a completion is being previewed.

I think this is because the relevant code is using cursorPos as its guide and should be using startPos.