ExRatatui.Event.Resize (ExRatatui v0.7.1)

Copy Markdown View Source

A terminal resize event.

Emitted when the user resizes the terminal window.

Fields

  • :width - new terminal width in columns
  • :height - new terminal height in rows

Examples

iex> %ExRatatui.Event.Resize{width: 80, height: 24}
%ExRatatui.Event.Resize{width: 80, height: 24}

Pattern matching on events:

%Event.Resize{width: w, height: h} ->
  # re-render with new dimensions

Summary

Types

t()

@type t() :: %ExRatatui.Event.Resize{
  height: non_neg_integer() | nil,
  width: non_neg_integer() | nil
}