Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Methods for getting viewport offsets and line number padding #82

Open
achristmascarl opened this issue Sep 16, 2024 · 0 comments

Comments

@achristmascarl
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant