Documentation
¶
Index ¶
- type Model
- func (m *Model) Clear()
- func (m Model) FilePath() string
- func (m Model) GetSearchableLines() []SearchableLine
- func (m Model) GetViewMode() string
- func (m Model) Init() tea.Cmd
- func (m Model) IsFocused() bool
- func (m *Model) JumpToLine(idx int)
- func (m *Model) SetDiff(diff *git.FileDiff, filePath string)
- func (m *Model) SetFocused(focused bool)
- func (m *Model) SetSize(width, height int)
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- type SearchableLine
- type SideBySideLine
- type ViewMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the diff view component
func (Model) GetSearchableLines ¶
func (m Model) GetSearchableLines() []SearchableLine
GetSearchableLines returns lines for searching based on current view mode
func (Model) GetViewMode ¶
GetViewMode returns the current view mode as a string
func (*Model) JumpToLine ¶
JumpToLine jumps to a specific line index
func (*Model) SetFocused ¶
SetFocused sets whether this component is focused
type SearchableLine ¶
SearchableLine represents a line that can be searched
type SideBySideLine ¶
type SideBySideLine struct {
OldLineNum int
OldContent string
OldType git.DiffLineType
NewLineNum int
NewContent string
NewType git.DiffLineType
}
SideBySideLine represents a line in the side-by-side view
Click to show internal directories.
Click to hide internal directories.