filetree

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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
}

func New

func New() Model

func (Model) CopyFilePath added in v0.3.0

func (m Model) CopyFilePath(cursor int) tea.Cmd

func (Model) GetFileAtY added in v0.4.0

func (m Model) GetFileAtY(y int) string

GetFileAtY returns the file path at the given Y coordinate (0-indexed visual line), or "" if none.

func (Model) GetYOffset added in v0.4.0

func (m Model) GetYOffset() int

GetYOffset returns the viewport's current Y scroll offset.

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) ScrollDown added in v0.4.0

func (m *Model) ScrollDown(lines int)

ScrollDown scrolls the viewport down by the given number of lines.

func (*Model) ScrollUp added in v0.4.0

func (m *Model) ScrollUp(lines int)

ScrollUp scrolls the viewport up by the given number of lines.

func (Model) SetCursor

func (m Model) SetCursor(cursor int) Model

func (Model) SetCursorNoScroll added in v0.4.0

func (m Model) SetCursorNoScroll(cursor int) Model

SetCursorNoScroll updates the selected file without scrolling the viewport. Use this when the user clicks on a file they can already see.

func (Model) SetFiles

func (m Model) SetFiles(files []*gitdiff.File) Model

func (*Model) SetSize

func (m *Model) SetSize(width, height int) tea.Cmd

SetSize implements the Component interface.

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL