ClearSelection | func (d *DiffViewer) ClearSelection() | ClearSelection clears all line selections |
GetCurrentHunkIndex | func (d *DiffViewer) GetCurrentHunkIndex() int | GetCurrentHunkIndex returns the hunk index of the current line |
GetHunkLines | func (d *DiffViewer) GetHunkLines(hunkIndex int) []DiffLine | GetHunkLines returns all lines in the specified hunk |
GetHunks | func (d *DiffViewer) GetHunks() []DiffHunk | GetHunks returns all hunks from the result |
GetSelectedLine | func (d *DiffViewer) GetSelectedLine() *DiffLine | GetSelectedLine returns the currently selected line |
GetSelectedLines | func (d *DiffViewer) GetSelectedLines() []DiffLine | GetSelectedLines returns all selected lines |
GetStats | func (d *DiffViewer) GetStats() DiffStats | GetStats returns diff statistics |
NextChange | func (d *DiffViewer) NextChange() | NextChange jumps to the next changed line |
NextHunk | func (d *DiffViewer) NextHunk() | NextHunk moves to the next hunk |
PrevChange | func (d *DiffViewer) PrevChange() | PrevChange jumps to the previous changed line |
PrevHunk | func (d *DiffViewer) PrevHunk() | PrevHunk moves to the previous hunk |
SelectAllInHunk | func (d *DiffViewer) SelectAllInHunk() | SelectAllInHunk selects all changed lines in the current hunk |
SetContextLines | func (d *DiffViewer) SetContextLines(count int) *DiffViewer | SetContextLines sets context lines around changes |
SetDiff | func (d *DiffViewer) SetDiff(old, new string) *DiffViewer | SetDiff computes and displays diff between old and new content |
SetDiffResult | func (d *DiffViewer) SetDiffResult(result *DiffResult) *DiffViewer | SetDiffResult sets a pre-computed diff result |
SetOnHunkAction | func (d *DiffViewer) SetOnHunkAction(fn func(hunkIndex int, lines []DiffLine)) *DiffViewer | SetOnHunkAction sets callback for hunk-level operations |
SetOnLineSelect | func (d *DiffViewer) SetOnLineSelect(fn func(line DiffLine)) *DiffViewer | SetOnLineSelect sets callback for line selection |
SetOnLinesAction | func (d *DiffViewer) SetOnLinesAction(fn func(lines []DiffLine)) *DiffViewer | SetOnLinesAction sets callback for selected lines operations |
SetSelectionEnabled | func (d *DiffViewer) SetSelectionEnabled(enabled bool) *DiffViewer | SetSelectionEnabled enables/disables line selection mode (for staging) |
SetShowLineNumbers | func (d *DiffViewer) SetShowLineNumbers(show bool) *DiffViewer | SetShowLineNumbers toggles line number display |
SetSideBySide | func (d *DiffViewer) SetSideBySide(enabled bool) *DiffViewer | SetSideBySide enables/disables side-by-side mode |
SetTitle | func (d *DiffViewer) SetTitle(title string) *DiffViewer | SetTitle sets the header title |
SetUnifiedDiff | func (d *DiffViewer) SetUnifiedDiff(diff string) *DiffViewer | SetUnifiedDiff parses and displays a unified diff string (e.g., from git) |
SetWordDiff | func (d *DiffViewer) SetWordDiff(enabled bool) *DiffViewer | SetWordDiff enables word-level diff highlighting |
ToggleLineSelection | func (d *DiffViewer) ToggleLineSelection() | ToggleLineSelection toggles selection of the current line |