Documentation
¶
Overview ¶
Package panels contains Bubble Tea sub-models for the diff TUI.
Index ¶
- func ApplyDiffPalette(p jsonpanels.Palette)
- func ApplyPalette(p jsonpanels.Palette)
- func StatusBar(d *node.Diff, view string, width int, searchMode bool, searchQuery string, ...) string
- type InfoPanel
- type SplitPanel
- func (p *SplitPanel) CycleFocus()
- func (p *SplitPanel) HalfPageDown()
- func (p *SplitPanel) HalfPageUp()
- func (p *SplitPanel) MatchCount() int
- func (p *SplitPanel) NextMatch()
- func (p *SplitPanel) PrevMatch()
- func (p *SplitPanel) Resize(w, h int)
- func (p *SplitPanel) ScrollDown(n int)
- func (p *SplitPanel) ScrollUp(n int)
- func (p *SplitPanel) SetSearch(q string)
- func (p *SplitPanel) View() string
- type UnifiedPanel
- func (p *UnifiedPanel) CurrentHunkIdx() int
- func (p *UnifiedPanel) HalfPageDown()
- func (p *UnifiedPanel) HalfPageUp()
- func (p *UnifiedPanel) MatchCount() int
- func (p *UnifiedPanel) NextMatch()
- func (p *UnifiedPanel) PrevMatch()
- func (p *UnifiedPanel) Resize(w, h int)
- func (p *UnifiedPanel) ScrollDown(n int)
- func (p *UnifiedPanel) ScrollUp(n int)
- func (p *UnifiedPanel) SetFocused(f bool)
- func (p *UnifiedPanel) SetSearch(q string)
- func (p *UnifiedPanel) View() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDiffPalette ¶
func ApplyDiffPalette(p jsonpanels.Palette)
ApplyDiffPalette updates diff panel style vars.
func ApplyPalette ¶
func ApplyPalette(p jsonpanels.Palette)
ApplyPalette updates status bar styles from a palette.
Types ¶
type InfoPanel ¶
type InfoPanel struct {
// contains filtered or unexported fields
}
InfoPanel shows diff summary and hunk navigation.
func NewInfoPanel ¶
NewInfoPanel creates an info panel.
func (*InfoPanel) SetFocused ¶
func (*InfoPanel) SetHunkIdx ¶
SetHunkIdx updates which hunk is highlighted in the info panel.
type SplitPanel ¶
type SplitPanel struct {
// contains filtered or unexported fields
}
SplitPanel renders old and new file side-by-side with synchronised scrolling.
func NewSplitPanel ¶
func NewSplitPanel(d *node.Diff, w, h int) SplitPanel
NewSplitPanel creates a side-by-side diff panel.
func (*SplitPanel) CycleFocus ¶
func (p *SplitPanel) CycleFocus()
func (*SplitPanel) HalfPageDown ¶
func (p *SplitPanel) HalfPageDown()
func (*SplitPanel) HalfPageUp ¶
func (p *SplitPanel) HalfPageUp()
func (*SplitPanel) MatchCount ¶
func (p *SplitPanel) MatchCount() int
func (*SplitPanel) NextMatch ¶
func (p *SplitPanel) NextMatch()
func (*SplitPanel) PrevMatch ¶
func (p *SplitPanel) PrevMatch()
func (*SplitPanel) Resize ¶
func (p *SplitPanel) Resize(w, h int)
func (*SplitPanel) ScrollDown ¶
func (p *SplitPanel) ScrollDown(n int)
func (*SplitPanel) ScrollUp ¶
func (p *SplitPanel) ScrollUp(n int)
func (*SplitPanel) SetSearch ¶
func (p *SplitPanel) SetSearch(q string)
func (*SplitPanel) View ¶
func (p *SplitPanel) View() string
type UnifiedPanel ¶
type UnifiedPanel struct {
// contains filtered or unexported fields
}
UnifiedPanel renders the diff in classic unified format.
func NewUnifiedPanel ¶
func NewUnifiedPanel(d *node.Diff, w, h int) UnifiedPanel
NewUnifiedPanel creates a unified diff panel.
func (*UnifiedPanel) CurrentHunkIdx ¶
func (p *UnifiedPanel) CurrentHunkIdx() int
CurrentHunkIdx returns the hunk index based on viewport position.
func (*UnifiedPanel) HalfPageDown ¶
func (p *UnifiedPanel) HalfPageDown()
func (*UnifiedPanel) HalfPageUp ¶
func (p *UnifiedPanel) HalfPageUp()
func (*UnifiedPanel) MatchCount ¶
func (p *UnifiedPanel) MatchCount() int
func (*UnifiedPanel) NextMatch ¶
func (p *UnifiedPanel) NextMatch()
func (*UnifiedPanel) PrevMatch ¶
func (p *UnifiedPanel) PrevMatch()
func (*UnifiedPanel) Resize ¶
func (p *UnifiedPanel) Resize(w, h int)
func (*UnifiedPanel) ScrollDown ¶
func (p *UnifiedPanel) ScrollDown(n int)
func (*UnifiedPanel) ScrollUp ¶
func (p *UnifiedPanel) ScrollUp(n int)
func (*UnifiedPanel) SetFocused ¶
func (p *UnifiedPanel) SetFocused(f bool)
func (*UnifiedPanel) SetSearch ¶
func (p *UnifiedPanel) SetSearch(q string)
func (*UnifiedPanel) View ¶
func (p *UnifiedPanel) View() string
Click to show internal directories.
Click to hide internal directories.