# `MingaEditor.SemanticWindow.Selection`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/semantic_window/selection.ex#L1)

Visual selection overlay in display coordinates.

Sent as coordinate ranges so the GUI can render selection as Metal
quads behind text, avoiding line re-rasterization when the selection
changes.

# `selection_type`

```elixir
@type selection_type() :: :char | :line | :block
```

# `t`

```elixir
@type t() :: %MingaEditor.SemanticWindow.Selection{
  end_col: non_neg_integer(),
  end_row: non_neg_integer(),
  start_col: non_neg_integer(),
  start_row: non_neg_integer(),
  type: selection_type()
}
```

# `from_visual_selection`

```elixir
@spec from_visual_selection(
  nil
  | {:char, {non_neg_integer(), non_neg_integer()},
     {non_neg_integer(), non_neg_integer()}}
  | {:line, non_neg_integer(), non_neg_integer()},
  non_neg_integer()
) :: t() | nil
```

Builds a selection from the render context's visual_selection.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
