Expand description
Workspace and multi-buffer / multi-view model.
editor-core is intentionally UI-agnostic, but a full-featured editor typically needs a
kernel-level model for:
- managing multiple open buffers (text + undo + derived metadata)
- managing multiple views into the same buffer (split panes)
This module provides a small Workspace that owns:
BufferId+CommandExecutor(buffer text + undo + derived state)ViewId+ per-view state (selections/cursors, wrap config, scroll)
The workspace executes commands against a specific view. Text edits are applied to the
underlying buffer, and any resulting crate::TextDelta is broadcast to all views of the
same buffer.
Structs§
- Buffer
Id - Opaque identifier for an open buffer in a
Workspace. - Buffer
Metadata - Metadata attached to a workspace buffer.
- Open
Buffer Result - Result of opening a buffer (a buffer always starts with a default view).
- ViewId
- Opaque identifier for a view into a buffer in a
Workspace. - View
Smooth Scroll State - Smooth-scrolling state for a view.
- Workspace
- A collection of open buffers and their views.
- Workspace
Search Result - Search matches for a single open buffer in a
Workspace. - Workspace
Viewport State - Viewport state for a workspace view, including visual totals and smooth-scrolling metadata.
Enums§
- Workspace
Error - Workspace-level errors.