MingaEditor.State.Search (Minga v0.1.0)

Copy Markdown View Source

Groups search-related fields from EditorState.

Tracks the last search pattern and direction (for n/N repeat), and cached project-wide search results for the picker.

Summary

Functions

Records the last search pattern and direction.

Records just the last search pattern (keeps existing direction).

Types

t()

@type t() :: %MingaEditor.State.Search{
  last_direction: Minga.Editing.Search.direction(),
  last_pattern: String.t() | nil,
  project_results: [Minga.Project.ProjectSearch.match()]
}

Functions

record(s, pattern, direction)

@spec record(t(), String.t(), Minga.Editing.Search.direction()) :: t()

Records the last search pattern and direction.

record_pattern(s, pattern)

@spec record_pattern(t(), String.t()) :: t()

Records just the last search pattern (keeps existing direction).