Highlight all matches in Notebook on Find (#15562)

* iterate over every cell and highlight ranges.

* fix yellow for all matches and orange for current

* fix

* avoid duplicate deltaDecorations call

* initialize on declare
This commit is contained in:
Maddy
2021-06-04 15:45:51 -07:00
committed by GitHub
parent b490d53284
commit d04451985c
8 changed files with 267 additions and 139 deletions

View File

@@ -472,7 +472,7 @@ export class FutureStub implements nb.IFuture {
export class NotebookComponentStub implements INotebookEditor {
cellEditors: ICellEditorProvider[];
viewMode: string;
deltaDecorations(newDecorationRange: NotebookRange, oldDecorationRange: NotebookRange): void {
deltaDecorations(newDecorationsRange: NotebookRange | NotebookRange[], oldDecorationsRange: NotebookRange | NotebookRange[]): void {
throw new Error('Method not implemented.');
}
get notebookParams(): INotebookParams {
@@ -715,7 +715,7 @@ export class NotebookEditorStub implements INotebookEditor {
navigateToSection(sectionId: string): void {
throw new Error('Method not implemented.');
}
deltaDecorations(newDecorationRange: NotebookRange, oldDecorationRange: NotebookRange): void {
deltaDecorations(newDecorationsRange: NotebookRange | NotebookRange[], oldDecorationsRange: NotebookRange | NotebookRange[]): void {
throw new Error('Method not implemented.');
}
addCell(cellType: CellType, index?: number, event?: UIEvent) {
@@ -733,7 +733,7 @@ export class CellEditorProviderStub implements ICellEditorProvider {
getEditor(): QueryTextEditor {
throw new Error('Method not implemented.');
}
deltaDecorations(newDecorationRange: NotebookRange, oldDecorationRange: NotebookRange): void {
deltaDecorations(newDecorationsRange: NotebookRange | NotebookRange[], oldDecorationsRange: NotebookRange | NotebookRange[]): void {
throw new Error('Method not implemented.');
}
}