You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, the monaco editor only renders lines in its own viewport (this technique is called virtualization).
However, we can take this one step further: The editor should only render lines visible in the global viewport!
Thanks for attention this issue,and find examples to me.
btw i have try these examples,but it's seem not work well,beacause this solution work not well cause scroll event not calling every time.
when scroll fast to top or bottom will drop some scrolling event,it will cause set opposite translate position not accurate.
some times the value is very large(content already on top the value should be 0)
At the moment, the monaco editor only renders lines in its own viewport (this technique is called virtualization).
However, we can take this one step further: The editor should only render lines visible in the global viewport!
This would allow for scenarios such as this: (image taken from microsoft/monaco-editor#4033)
This would be the basis for stacked monaco editors and eventually stacked monaco diff editors.
Demo
Slow example that should be fast - try adding new lines.
Other issues of the demo:
Alternative
You can fake scrolling of the parent and just scroll in the editor like this or this.
The text was updated successfully, but these errors were encountered: