@@ -79,11 +98,17 @@ export class NotebookViewModel extends Disposable {
returnthis.viewCells.indexOf(cell);
}
/**
* Search in notebook text model
* @param value
*/
find(value:string):CellFindMatch[]{
letmatches:CellFindMatch[]=[];
constmatches:CellFindMatch[]=[];
this.viewCells.forEach(cell=>{
letcellMatches=cell.startFind(value);
matches.push(...cellMatches);
constcellMatches=cell.startFind(value);
if(cellMatches){
matches.push(cellMatches);
}
});
returnmatches;
...
...
@@ -130,6 +155,68 @@ export class NotebookViewModel extends Disposable {
});
}
/**
* Editor decorations across cells. For example, find decorations for multiple code cells
* The reason that we can't completely delegate this to CodeEditorWidget is most of the time, the editors for cells are not created yet but we already have decorations for them.