Documentation
¶
Index ¶
- Variables
- type Model
- func (m *Model) ClearCache()
- func (m *Model) Filtering() bool
- func (m Model) Init() tea.Cmd
- func (m *Model) RootDiffStats() (int64, int64)
- func (m *Model) ScrollBottom()
- func (m *Model) ScrollDown(lines int)
- func (m *Model) ScrollLeft(cols int)
- func (m *Model) ScrollRight(cols int)
- func (m *Model) ScrollTop()
- func (m *Model) ScrollUp(lines int)
- func (m *Model) Searching() bool
- func (m *Model) SelectionEnabled() bool
- func (m Model) SetDirPatch(dirPath string, files []*gitdiff.File) (Model, tea.Cmd)
- func (m Model) SetFilePatch(file *gitdiff.File) (Model, tea.Cmd)
- func (m *Model) SetFiltering()
- func (m *Model) SetPreamble(preamble string)
- func (m *Model) SetSelectionEnabled(val bool)
- func (m *Model) SetSideBySide(sideBySide bool) tea.Cmd
- func (m *Model) SetSize(width, height int) tea.Cmd
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ViewportKeyMap = viewport.KeyMap{ HalfPageDown: key.NewBinding( key.WithKeys("ctrl+d"), key.WithHelp("ctrl+d", "scroll half page down"), ), HalfPageUp: key.NewBinding( key.WithKeys("ctrl+u"), key.WithHelp("ctrl+u", "scroll half page up"), ), Up: key.NewBinding( key.WithKeys("up", "k"), key.WithHelp("↑/k", "prev file"), ), Down: key.NewBinding( key.WithKeys("down", "j"), key.WithHelp("↓/j", "next file"), ), Bottom: key.NewBinding( key.WithKeys("G"), key.WithHelp("G", "bottom"), ), Top: key.NewBinding( key.WithKeys("g"), key.WithHelp("g", "top"), ), Left: key.NewBinding( key.WithKeys("left"), key.WithHelp("←", "scroll left"), ), Right: key.NewBinding( key.WithKeys("right"), key.WithHelp("→", "scroll right"), ), }
Functions ¶
This section is empty.
Types ¶
type Model ¶
func (*Model) ClearCache ¶ added in v0.11.0
func (m *Model) ClearCache()
func (*Model) RootDiffStats ¶ added in v0.9.0
func (*Model) ScrollBottom ¶ added in v0.12.0
func (m *Model) ScrollBottom()
ScrollBottom scrolls the viewport to the bottom.
func (*Model) ScrollDown ¶ added in v0.4.0
ScrollDown scrolls the viewport down by the given number of lines.
func (*Model) ScrollLeft ¶ added in v0.12.0
ScrollLeft moves the viewport to the left by the given number of columns.
func (*Model) ScrollRight ¶ added in v0.12.0
ScrollRight scrolls the viewport one column away from column 0.
func (*Model) ScrollTop ¶ added in v0.12.0
func (m *Model) ScrollTop()
ScrollTop scrolls the viewport to its top.
func (*Model) ScrollUp ¶ added in v0.4.0
ScrollUp scrolls the viewport up by the given number of lines.
func (*Model) SelectionEnabled ¶ added in v0.12.0
func (Model) SetDirPatch ¶ added in v0.8.0
func (*Model) SetFiltering ¶ added in v0.12.0
func (m *Model) SetFiltering()
func (*Model) SetPreamble ¶ added in v0.11.0
SetPreamble stores the preamble text (e.g. commit metadata from git show).
func (*Model) SetSelectionEnabled ¶ added in v0.12.0
func (*Model) SetSideBySide ¶ added in v0.6.0
SetSideBySide updates the diff view mode and re-renders.
Click to show internal directories.
Click to hide internal directories.