I’m using a shortcut to insert an InlayComponent above where the caret is at.
I want to ensure that it’s within view when it gets inserted. There are cases where this isn’t guaranteed.
For example, if someone selects enough lines that the beginning of their selection is outside of the displayed code of the Editor.
- How do I detect if an inserted InlayComponent is not within view of the Editor?
- How do I determine how far up I need to scroll to display the full component?
Note that I do not always want to scroll since in most cases the component is within view. Scrolling in such instances would be disruptive to the user.