Documentation
¶
Index ¶
- type DisplayItem
- type FileSelectMsg
- type Model
- func (m Model) Cursor() int
- func (m Model) Files() []git.ChangedFile
- func (m Model) Init() tea.Cmd
- func (m Model) IsFocused() bool
- func (m Model) IsSearching() bool
- func (m Model) SelectedFile() *git.ChangedFile
- func (m *Model) SetCursor(pos int)
- func (m *Model) SetFiles(files []git.ChangedFile)
- 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 TreeNode
- type ViewMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DisplayItem ¶
type DisplayItem struct {
IsFolder bool
IsExpanded bool
FolderPath string
File *git.ChangedFile
Indent int
IsTypeHeader bool
TypeHeader string
}
DisplayItem represents an item in the display list
type FileSelectMsg ¶
type FileSelectMsg struct {
File *git.ChangedFile
}
FileSelectMsg is sent when a file is selected with Enter
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the file list component
func (Model) IsSearching ¶
IsSearching returns whether search is active
func (Model) SelectedFile ¶
func (m Model) SelectedFile() *git.ChangedFile
SelectedFile returns the currently selected file
func (*Model) SetFiles ¶
func (m *Model) SetFiles(files []git.ChangedFile)
SetFiles sets the list of files to display
func (*Model) SetFocused ¶
SetFocused sets whether this component is focused
Click to show internal directories.
Click to hide internal directories.