-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Implement search / find API #553
Comments
I get your use case. I think though that this would fit better in an add-on rather than in the core. The way I see this happening is through an abstraction in the rendering logic, that would allow you to pass additional HTML classes for particular tokens (e.g. P.S.: Have in mind though that interacting with the terminal's innerHTML or text directly is not part of it's public API so there is no guarantee that this will work. |
@parisk what you're describing is pretty similar to how link matchers work, we could potentially make that logic more generic (work with non This is very performance critical stuff so you need to be weary of when this manipulation occurs. 200ms is great for links but probably would be took slow for jumping around search terms. I like this model because it keeps As for finding the text to highlight it would need some way of traversing |
I would like to request a buffer search API. This would highlight all instances inside the buffer which match the search with the current search position highlighted uniquely.
Alternatively if you would like to make this more generic and only provide the means by which one could implement search, I would like the ability to highlight parts of the buffer via the API as well as the ability to flatten the buffer ignoring any special colouring and character tags etc (right now when i use innerHTML, colouring breaks words and sentences searching, innerText for some reason is return character code 160 instead of 32 for spaces).
The text was updated successfully, but these errors were encountered: