Documentation ¶
Index ¶
- type Code
- func (r *Code) GotoBottom()
- func (r *Code) GotoTop()
- func (r *Code) HalfViewDown()
- func (r *Code) HalfViewUp()
- func (r *Code) Init() tea.Cmd
- func (r *Code) LineDown(n int) []string
- func (r *Code) LineUp(n int) []string
- func (r *Code) ScrollPercent() float64
- func (r *Code) SetContent(c, ext string) tea.Cmd
- func (r *Code) SetShowLineNumber(show bool)
- func (r *Code) SetSize(width, height int)
- func (r *Code) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (r *Code) View() string
- func (r *Code) ViewDown() []string
- func (r *Code) ViewUp() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code struct { *vp.Viewport NoContentStyle lipgloss.Style LineDigitStyle lipgloss.Style LineBarStyle lipgloss.Style // contains filtered or unexported fields }
Code is a code snippet.
func (*Code) GotoBottom ¶
func (r *Code) GotoBottom()
GotoBottom moves the viewport to the bottom of the log.
func (*Code) HalfViewDown ¶
func (r *Code) HalfViewDown()
HalfViewDown moves the viewport down by half the viewport height.
func (*Code) HalfViewUp ¶
func (r *Code) HalfViewUp()
HalfViewUp moves the viewport up by half the viewport height.
func (*Code) ScrollPercent ¶
ScrollPercent returns the viewport's scroll percentage.
func (*Code) SetContent ¶
SetContent sets the content of the Code.
func (*Code) SetShowLineNumber ¶
SetShowLineNumber sets whether to show line numbers.
Click to show internal directories.
Click to hide internal directories.