Documentation
¶
Overview ¶
Package diff implements the diff viewer shown in a center tab, rendering a git change as scrollable, syntax-aware output.
Index ¶
- type Model
- func (m *Model) Blur()
- func (m *Model) CanConsumeWheel() bool
- func (m *Model) Focus()
- func (m *Model) Focused() bool
- func (m *Model) GetPath() string
- func (m *Model) Init() tea.Cmd
- func (m *Model) MatchesSource(changePath string, mode git.DiffMode) bool
- func (m *Model) ResetSource(ws *data.Workspace, change *git.Change, mode git.DiffMode)
- func (m *Model) SetFocused(focused bool)
- func (m *Model) SetSize(width, height int)
- func (m *Model) SetStyles(styles common.Styles)
- func (m *Model) Update(msg tea.Msg) (*Model, tea.Cmd)
- func (m *Model) View() string
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 (*Model) CanConsumeWheel ¶ added in v0.0.18
CanConsumeWheel reports whether the diff viewer has enough content for mouse-wheel scrolling to have an effect.
func (*Model) MatchesSource ¶ added in v0.0.19
MatchesSource reports whether the viewer is already showing the same diff target.
func (*Model) ResetSource ¶ added in v0.0.19
ResetSource updates the diff target before a reload while preserving viewer UI state.
func (*Model) SetFocused ¶
SetFocused sets the focused state
Click to show internal directories.
Click to hide internal directories.