# `Minga.Buffer.CursorContext`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga/buffer/cursor_context.ex#L1)

Coherent buffer metadata for cursor-local operations.

Cursor columns use Minga's internal UTF-8 byte offsets. `grapheme_column`
records the corresponding grapheme offset explicitly so callers never need
to treat a byte offset as a `String.slice/3` index.

# `t`

```elixir
@type t() :: %Minga.Buffer.CursorContext{
  byte_column: non_neg_integer(),
  file_path: String.t() | nil,
  filetype: atom(),
  grapheme_column: non_neg_integer(),
  line: non_neg_integer(),
  line_prefix: String.t(),
  line_text: String.t(),
  version: non_neg_integer()
}
```

# `new`

```elixir
@spec new(Minga.Buffer.Document.t(), non_neg_integer(), String.t() | nil, atom()) ::
  t()
```

Builds a coherent cursor-local snapshot from buffer-owned state.

# `position`

```elixir
@spec position(t()) :: Minga.Buffer.Document.position()
```

Returns the internal byte-indexed cursor position.

# `text_since`

```elixir
@spec text_since(t(), Minga.Buffer.Document.position()) :: String.t() | nil
```

Returns the text between a same-line byte position and the cursor.

---

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