Versions in this module Expand all Collapse all v0 v0.1.1 Jul 27, 2026 Changes in this version + type LineIndex struct + HunkLineCounts []int + HunkOffsets []int + TotalLines int + func (idx *LineIndex) FindHunkForOffset(offset int) (hunkIdx, lineInHunk int) + type MatchRange struct + End int + Start int + type Model struct + func New(cfg config.Config) Model + func (m *Model) IsSideBySide() bool + func (m *Model) Scroll(delta int) + func (m *Model) ScrollFullPageDown(viewHeight int) + func (m *Model) ScrollFullPageUp(viewHeight int) + func (m *Model) ScrollHalfPageDown(viewHeight int) + func (m *Model) ScrollHalfPageUp(viewHeight int) + func (m *Model) SetFileChange(file diff.FileChange) + func (m *Model) SetSearchState(isSearching bool, getMatches func(hunkIdx, lineIdx int) []MatchRange) + func (m *Model) SetSelection(selectedHunk int, isSelected func(hunkIdx int) bool) + func (m *Model) SetTagState(getHunkTags func(hunkIdx int) []SplitTag) + func (m *Model) SetVisualState(lineCursor int, isVisualMode bool, visualAnchor int, ...) + func (m *Model) ShowLineNumbers() bool + func (m *Model) ShowWhitespace() bool + func (m *Model) ToggleLineNumbers() + func (m *Model) ToggleSideBySide() + func (m *Model) ToggleWhitespace() + func (m *Model) ToggleWordDiff() + func (m *Model) WordLevelDiff() bool + func (m Model) View(width, height int, focused bool) string + type RenderContext struct + Focused bool + GetMatches func(hunkIdx, lineIdx int) []MatchRange + Height int + IsLineSelected func(hunkIdx, lineIdx int) bool + IsSearching bool + IsSelected func(hunkIdx int) bool + IsVisualMode bool + LineCursor int + SelectedHunk int + ShowLineNumbers bool + ShowWhitespace bool + TabWidth int + VisualAnchor int + Width int + WordDiffCache *WordDiffCache + WordLevelDiff bool + type SideBySideView struct + func NewSideBySideView() *SideBySideView + func (v *SideBySideView) Render(file *diff.FileChange, ctx RenderContext) string + func (v *SideBySideView) SupportsSelection() bool + type SplitTag rune + type ViewMode interface + Render func(file *diff.FileChange, ctx RenderContext) string + SupportsSelection func() bool + type ViewModeType string + const ViewModeSideBySide + const ViewModeUnified + type WordDiffCache struct + HunkDiffs map[int]map[int]diff.WordDiffResult