-
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
Improve search addon API #705
Comments
It would also be great to have an api that gets the total number of matched instances, and the index of the currently active instance, as well as a mechanism to get notified when the total number or active index changes. This would allow a consumer to draw a find UI and provide some more info to the user. |
@mofux this was one of the first thoughts I had, I left it out due to performance concerns as it's not the most efficient thing to convert a large buffer into searchable strings as each individual character is stored within it's own array. The buffer is basically structured like this: Definitely worth exploring later on whether my guesses around this are true though 👍. I added it to the list 😃 |
@Tyriar Interesting to see that a modern terminal emulator shares so many problems with code editors like |
@mofux yeah it's been useful to have people who work on monaco to ask about things. A lot of stuff poses similar problems. The fact that the buffer is continuously trimmed and that it's common to run a command that get a crazy amount of data streamed in are biggest unique parts. |
It would be nice to have a browser-style “find-as-you-type” logic. I think it would work if a couple functions were added:
These would expand the current selection if the Thoughts? |
@FGasper yeah this sort of thing would be good, probably best tackled after this one: Find multiple instances on the same line. Added it to the list |
Coming from #1649 I suggest to split up the functionality of the search addon into:
|
The find API introduced in #704 can be expanded upon in the future to support:
Find terms that are wrapped across 2 linesOptions: regex, case sensitivity, etc.Allow "find as you type", allowing the current selection to be expanded if it matchesThe text was updated successfully, but these errors were encountered: