Versions in this module Expand all Collapse all v0 v0.3.4 Nov 26, 2026 v0.3.3 Nov 25, 2026 v0.3.2 Nov 25, 2026 v0.3.1 Nov 25, 2026 v0.3.0 Nov 23, 2026 v0.2.0 Nov 19, 2026 v0.1.0 Nov 16, 2026 Changes in this version + type Annotation struct + ID string + Line int + Side Side + type Change struct + NewValue string + OldValue string + type Classes struct + AddAnnotation string + Annotation string + Content string + FileHeader string + Filler string + Gutter string + HunkActions string + IndicatorAdded string + IndicatorDeleted string + Line string + LineAdded string + LineDeleted string + LineNumber string + LineNumberAdded string + LineNumberDeleted string + LineSelected string + Region string + Separator string + Side string + WordAdded string + WordDeleted string + type DiffView struct + Annotations func() []Annotation + Class string + Classes Classes + ContextLines int + ExpandAll bool + FontFamily string + FontSize core.Points + Highlighter func(language string) Highlighter + Indicators Indicators + Inline Inline + Language string + LineHeight core.Points + NewValue func() string + NoLineNumbers bool + OldValue func() string + OnChange func(Change) + OnError func(error) + OnFileToggle func(File) + OnHunkBoundsChange func([]HunkBounds) + OnLayout func(core.Bounds) + OnLineNumberPress func(Line) + OnLineSelectionChange func(lines *LineRange) + OnScroll func(core.ScrollEvent) + OnStatsChange func(Stats) + Patch func() string + Ref *Ref + RenderAddAnnotation func(cx *core.Scope, lines LineRange) core.Node + RenderAnnotation func(cx *core.Scope, a Annotation) core.Node + RenderFileHeader func(cx *core.Scope, f File) core.Node + RenderHunkActions func(cx *core.Scope, h Hunk) core.Node + RenderRegionActions func(cx *core.Scope, r Region) core.Node + RenderSeparator func(cx *core.Scope, s Separator) core.Node + Selectable bool + SeparatorHeight core.Points + SoftWrap bool + Style core.Style + StyleFunc func() core.Style + Styles Styles + StylesFunc func() Styles + TestID string + Tooltip core.Node + Unified bool + func (p DiffView) Render(cx *core.Scope) core.Node + type Expansion uint8 + const ExpandDown + const ExpandEvery + const ExpandUp + type File struct + Added int + Binary bool + Collapsed bool + Deleted int + FirstHunk int + Hunks int + Index int + OldPath string + Path string + Status FileStatus + type FileStatus uint8 + const FileAdded + const FileCopied + const FileDeleted + const FileModified + const FileRenamed + type Highlighter = syntax.Highlighter + type Hunk struct + File int + Index int + NewLines int + NewStart int + OldLines int + OldStart int + type HunkBounds struct + Bounds core.Bounds + Index int + type Indicators uint8 + const IndicatorBars + const IndicatorClassic + const IndicatorNone + type Inline uint8 + const InlineChar + const InlineNone + const InlineWord + const InlineWordAlt + type Line struct + Line int + Side Side + type LineRange struct + End int + Side Side + Start int + type Ref struct + func (r *Ref) AcceptHunk(i int) + func (r *Ref) AcceptRegion(x Region) + func (r *Ref) CollapseAll() + func (r *Ref) CollapseFile(path string) + func (r *Ref) CurrentHunk() (int, bool) + func (r *Ref) Expand(gap int, how Expansion, lines int) + func (r *Ref) ExpandAll() + func (r *Ref) ExpandFile(path string) + func (r *Ref) Files() []File + func (r *Ref) GoToHunk(i int) + func (r *Ref) HunkBounds() []HunkBounds + func (r *Ref) Hunks() []Hunk + func (r *Ref) NextHunk() (int, bool) + func (r *Ref) PreviousHunk() (int, bool) + func (r *Ref) RevertHunk(i int) + func (r *Ref) RevertRegion(x Region) + func (r *Ref) ScrollOffset() core.Points + func (r *Ref) ScrollToFile(path string) + func (r *Ref) SelectedLines() (LineRange, bool) + func (r *Ref) SelectedText() string + func (r *Ref) SetScrollOffset(y core.Points) + func (r *Ref) SetSelectedLines(lines *LineRange) + func (r *Ref) Stats() Stats + func (r *Ref) ToggleFile(path string) + type Region struct + New []int + Old []int + Selected bool + type Separator struct + First bool + Gap int + Header string + Last bool + Lines int + type Side uint8 + const New + const Old + type Stats struct + Added int + Deleted int + Hunks int + type Styles struct + AddAnnotation core.Style + Annotation core.Style + Content core.Style + FileHeader core.Style + Filler core.Style + Gutter core.Style + HunkActions core.Style + IndicatorAdded core.Style + IndicatorDeleted core.Style + Line core.Style + LineAdded core.Style + LineDeleted core.Style + LineNumber core.Style + LineNumberAdded core.Style + LineNumberDeleted core.Style + LineSelected core.Style + Region core.Style + Separator core.Style + Side core.Style + WordAdded core.Style + WordDeleted core.Style + type Token = syntax.Token