[Bug] inlay hint bug in sticky line
Reproducible in vscode.dev or in VS Code Desktop?
- [X] Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- [ ] Not reproducible in the monaco editor playground
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.51.0#XQAAAAKbAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwzt51RgmSaumWUF-TBOs7hSruXioSxyeSO7k_l1UIzWNddFqt-6khNLmgbO-hd7_R9DHrqg9S4UTF4tNbOQ6HWysoutPZajWg6a6p4gu_aijmUDOoVbql1zvXc--j_6BXxKfUIVOWBV9SRM_oPYAAYrQcgs4cuI-zuvU2UoPxlzIsSmj0jQAnUhWfyLjRI4l3nvAhiuyIF2IfXsiOdgKeb7Is2JnTgxZZFStTSaAvLaA3NgEtQlWZiPCXmcRie_aVz43uf7KgfKtbSUdLQRooKr943W_-09tDdvotyVJQx3akcatJmcaqAbBMuWvIp5VFoWEvI_w91R8
Monaco Editor Playground Code
const value = `
function foo(option) {}
export default foo({
${' //\n'.repeat(80)}
bar() {
//
},
})
`;
const editor = monaco.editor.create(document.getElementById("container"), {
value,
language: "javascript",
});
monaco.languages.typescript.javascriptDefaults.setInlayHintsOptions({
includeInlayParameterNameHints: 'all',
})
Reproduction Steps
- Open playground link
- scroll down the preview code to about line number 88
Actual (Problematic) Behavior
Expected Behavior
no bug
Additional Context
No response
Can repro. @aiday-mar can you look into this in debt week?
Hi thank you for filing this issue. After some investigation I believe sticky scroll works as intended, it is reflecting the editor lines which themselves have a growing number of inlay hints appended to them. You can see this happen in the following screen recording where we briefly see the actual editor lines with all the extra inlay hints.
https://github.com/user-attachments/assets/460fc235-b5d9-491b-88b6-f7da27a7bcf5
This behavior is also mirrored in the following issue https://github.com/microsoft/monaco-editor/issues/4700. I will close this issue, as it is a consequence of the root cause of the issue.