Groups search-related fields from EditorState.
Tracks the last search pattern and direction (for n/N repeat),
the pending project-wide search query (read off the editor path by the
project search picker source), and the GUI search toolbar state (active,
flags, replace mode).
Summary
Functions
Activates the GUI search toolbar with the given flags.
Dismisses the GUI search toolbar.
Returns whether the GUI search toolbar is active.
Records the last search pattern and direction.
Records just the last search pattern (keeps existing direction).
Sets replace mode on the GUI search toolbar.
Sets just the last search direction.
Stores the pending project-wide search query for the async picker source.
Updates the GUI search toolbar flags. Activates the toolbar with replace_mode: false if not already active.
Types
@type gui_search() :: %{ replace_mode: boolean(), case_sensitive: boolean(), whole_word: boolean(), regex: boolean() }
GUI search toolbar state. Non-nil means the toolbar is active.
@type t() :: %MingaEditor.State.Search{ gui_search: gui_search() | nil, last_direction: Minga.Editing.Search.direction(), last_pattern: String.t() | nil, project_query: String.t() | nil }
Functions
Activates the GUI search toolbar with the given flags.
Dismisses the GUI search toolbar.
Returns whether the GUI search toolbar is active.
@spec record(t(), String.t(), Minga.Editing.Search.direction()) :: t()
Records the last search pattern and direction.
Records just the last search pattern (keeps existing direction).
Sets replace mode on the GUI search toolbar.
@spec set_last_direction(t(), Minga.Editing.Search.direction()) :: t()
Sets just the last search direction.
Stores the pending project-wide search query for the async picker source.
Updates the GUI search toolbar flags. Activates the toolbar with replace_mode: false if not already active.