-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Closed
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalitynotebookon-testplan
Milestone
Description
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 toPieceTreeTextBufferFactory
- 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.
- If a cell is not visible, we will create a
- 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
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalitynotebookon-testplan