Open BeishaoCao-db opened 3 months ago
This Is seems to InlineCompletion's inside strategy rather than a bug,When the current line is empty and your insertText is start with more than a tab size blank string(eg: text
), The cursor will close to your completion first rather then accept it, you should change your insertText at first tab to handle this situation.
@qirong77 Yes, that's my first assumption. However, in the example I provided, if you change the initial code to be select\n
rather than select\n *
, then you will see tab can accept something with tab size blank string.
e.g. Is it because monaco detect size to be 4 then?
If that's the case, let me change the logic then
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.47.0#XQAAAAJQAgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw1r3sCnGBGpWlpVktocO7_BJCkQTDFxvol36GvVmJLcE84C3knSa45xr2hL4V3CzK7RsXTTl3GKNcoe1EOluseUOqlAiRzt565Aikzvea61xWU_C6O4O4af9d95Ho8N37E04AP_F4QgtoH62aRToKkEAPJZoSsZZfAcW23V_8iVY6IVDJixX7Qj5iTFcYx3oLLpyOrtWl5zCHbN-ayZrwUeHldP8jznwshtDv_rgKRk-aCws0DDW2EPOv5b5f_xemFBnpV9OH_7CG5c1Z7OsTHfGIu7oi9k30gjuf2n26CCHN7kRQ-Sye4CP3wTY_3KIXJzrmOTR4TMCrfTPmM8Oi2diYm4dP9RHHrmilKrj-bUnY
Monaco Editor Playground Code
Reproduction Steps
Actual (Problematic) Behavior
Tab can only accept empty space
Expected Behavior
Tab accept the full suggestion
Additional Context
https://github.com/microsoft/monaco-editor/assets/109033553/81f3a38b-1bd9-4201-8034-3e3b6bcf6ed7
Try on 0.43,0.44,0.47, all don't work. Have to mention, sometimes it works, sometimes it doesn't. Not sure what's the pattern