Conversation
There was a problem hiding this comment.
In general the code looks great. I made a couple of documentation comments.
My main concern about this is that it is bloating the core of the library, since "search" functionality is not essentially part of a terminal emulator.
I would prefer if we could offload this somehow to an add-on or something like that that can be "excluded" at build time.
Edit: I definitely want to see this merged into the code base, but I want us to consider a different place, rather than the core.
| this._buffer = buffer; | ||
| } | ||
|
|
||
| public get selectionStart(): [number, number] { return this._model.finalSelectionStart; } |
There was a problem hiding this comment.
Can you document these with JSDoc please?
| return charIndex; | ||
| } | ||
|
|
||
| public setSelection(col: number, row: number, length: number): void { |
There was a problem hiding this comment.
Can you document this with JSDoc please?
|
👍 I can look into pulling this out into an addon. It will have to use private API. as long as we have good testing to prevent regressions that shouldn't matter though. |
|
Since we are the ones implementing and maintaining it, I think it's totally OK to use private APIs in add-ons. |
|
@parisk any comments on the current approach? I managed to get search working as both the first multi-file and first TypeScript addon. Right now we can't touch anything outside of TODO:
|
|
@Tyriar the implementation looks good to me 👍 . I also liked that this introduces the first TypeScript add-on 😄 . A couple of to-dos after merging this PR:
|
df0303a to
0a15877
Compare
|
@parisk ready for review, after wrestling with Travis for 30 minutes 😛 |
|
Wooo 🎉 ! |
This PR exposes 2 new functions on
Terminal:Currently they scroll to and select the matching search term (using the selection model introduced in #670).
Fixes #553