Skip to main content

Module workspace

Module workspace 

Source
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§

BufferId
Opaque identifier for an open buffer in a Workspace.
BufferMetadata
Metadata attached to a workspace buffer.
OpenBufferResult
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.
ViewSmoothScrollState
Smooth-scrolling state for a view.
Workspace
A collection of open buffers and their views.
WorkspaceSearchResult
Search matches for a single open buffer in a Workspace.
WorkspaceViewportState
Viewport state for a workspace view, including visual totals and smooth-scrolling metadata.

Enums§

WorkspaceError
Workspace-level errors.