Feature Request: Methods for getting viewport offsets and line number padding
Opened this issue · 0 comments
achristmascarl commented
reason
with the scroll offsets and the width of the line number padding, users of the library will be able to determine what parts of the textarea are rendered and where, enabling a host of extensions to be built on top of the textarea without needing to alter the underlying library at all. for example:
- mouse event handling to move the cursor to a specific location by clicking
- tooltips / overlays
- inlay hints / suggestions
- dropdown menus for things like auto-completion
- i think you could even make syntax highlighting work with just these numbers
possible solution
one method to expose top_col / top_row from the viewport, and another method to expose the width of the line numbers