MingaEditor.Shell.Traditional.Flashes (Minga v0.1.0)

Copy Markdown View Source

Pure aggregate for independent navigation and yank flash owners.

Replacing, advancing, or cancelling one leaf never changes the other leaf.

Summary

Functions

Advances only the matching navigation generation.

Advances only the matching yank generation.

Cancels only the navigation flash.

Cancels only the yank flash.

Records only the navigation timer handle.

Records only the yank timer handle.

Replaces only the navigation flash.

Types

t()

@type t() :: %MingaEditor.Shell.Traditional.Flashes{
  nav: MingaEditor.Shell.Traditional.NavFlash.t(),
  yank: MingaEditor.Shell.Traditional.YankFlash.t()
}

Functions

advance_nav(flashes, generation)

@spec advance_nav(t(), MingaEditor.Shell.Traditional.NavFlash.generation()) ::
  {:continue | :done | :stale, t()}

Advances only the matching navigation generation.

advance_yank(flashes, generation)

@spec advance_yank(t(), MingaEditor.Shell.Traditional.YankFlash.generation()) ::
  {:continue | :done | :stale, t()}

Advances only the matching yank generation.

cancel_nav(flashes)

@spec cancel_nav(t()) :: t()

Cancels only the navigation flash.

cancel_yank(flashes)

@spec cancel_yank(t()) :: t()

Cancels only the yank flash.

record_nav_timer(flashes, generation, timer)

@spec record_nav_timer(
  t(),
  MingaEditor.Shell.Traditional.NavFlash.generation(),
  reference()
) :: t()

Records only the navigation timer handle.

record_yank_timer(flashes, generation, timer)

@spec record_yank_timer(
  t(),
  MingaEditor.Shell.Traditional.YankFlash.generation(),
  reference()
) :: t()

Records only the yank timer handle.

replace_nav(flashes, line)

@spec replace_nav(t(), non_neg_integer()) :: t()

Replaces only the navigation flash.

replace_yank(flashes, buf, start_pos, end_pos, range_type)

Replaces only the yank flash.