diff

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 10 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
}

Model is the Bubble Tea model for the native diff viewer

func New

func New(ws *data.Workspace, change *git.Change, mode git.DiffMode, width, height int) *Model

New creates a new diff viewer model

func (*Model) Blur

func (m *Model) Blur()

Blur removes focus

func (*Model) Focus

func (m *Model) Focus()

Focus sets the component as focused

func (*Model) Focused

func (m *Model) Focused() bool

Focused returns whether the component is focused

func (*Model) GetPath

func (m *Model) GetPath() string

GetPath returns the file path being viewed

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init initializes the diff viewer and starts loading the diff

func (*Model) SetFocused

func (m *Model) SetFocused(focused bool)

SetFocused sets the focused state

func (*Model) SetSize

func (m *Model) SetSize(width, height int)

SetSize sets the component dimensions

func (*Model) SetStyles

func (m *Model) SetStyles(styles common.Styles)

SetStyles updates the component's styles

func (*Model) Update

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

Update handles messages

func (*Model) View

func (m *Model) View() string

View renders the diff viewer

Jump to

Keyboard shortcuts

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