You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The notebook rendering is virtualized, thus when we do search and replace in a notebook, we need to operate on the the underlining text model. The text model behind a notebook document is an array of text or ITextModel:
- text
- text
- `ITextModel`, resolved from text when the cell is rendered in the view
- text
When Find/Replace starts, we will run search on every cell. To leverage the existing search functionality in Monaco Editor, the whole process will fall into following steps:
ICell converts text sources to PieceTreeTextBufferFactory
If a cell is not visible, we will create a PieceTreeTextBuffer from the buffer factory, run query on the buffer
If a cell is visible and there is already a text model created for it (which is created from the same buffer factory, thus they share the same immutable data structure for content, memory saved 📝 ). We run query directly on text model.
There will be a managed find controller for each notebook editor, which will
manage the states of find matches, active match, etc
push decorations to monaco editors
Notebook Editor will be responsible to reveal the cell which has the active match into view
If there is folding/virtualization in Monaco Editor, it needs to reveal both the cell and the line in the nested editor
The text was updated successfully, but these errors were encountered:
The notebook rendering is virtualized, thus when we do search and replace in a notebook, we need to operate on the the underlining text model. The text model behind a notebook document is an array of text or
ITextModel
:When Find/Replace starts, we will run search on every cell. To leverage the existing search functionality in Monaco Editor, the whole process will fall into following steps:
ICell
converts text sources toPieceTreeTextBufferFactory
PieceTreeTextBuffer
from the buffer factory, run query on the bufferThe text was updated successfully, but these errors were encountered: