pkg

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package pkg provides the core functionality of the program.

Package pkg provides the core functionality of the program.

Package pkg provides the core functionality of the program.

Index

Constants

This section is empty.

Variables

View Source
var Theme = irodori.Zen

Theme is the default color theme of the program.

Functions

func BuildHelpPane

func BuildHelpPane() *tview.Flex

BuildHelpPane returns a new help pane.

func BuildInlinePane

func BuildInlinePane(text, title string) *tview.TextView

BuildInlinePane returns a new inline pane.

func BuildMainView

func BuildMainView(pages *tview.Pages, help *tview.Flex) *tview.Flex

BuildMainView returns a new main view.

func BuildPages

func BuildPages(split *tview.Flex, inline *tview.TextView) *tview.Pages

BuildPages returns a new pages.

func BuildSidePane

func BuildSidePane(text, title string) *tview.TextView

BuildSidePane returns a new side pane.

func BuildSplitPane

func BuildSplitPane(leftPane, rightPane *tview.TextView) *tview.Flex

BuildSplitPane returns a new split pane.

func GenStringForInline

func GenStringForInline(l []diffy.Line) string

GenStringForInline returns a string for inline view.

func GenStringForSplit

func GenStringForSplit(l []diffy.Line) (string, string)

GenStringForSplit returns a string for split view.

func IsChangeModeKey

func IsChangeModeKey(e *tcell.EventKey) bool

IsChangeModeKey returns true if the key is a change mode key.

func IsFocusLeftKey

func IsFocusLeftKey(e *tcell.EventKey) bool

IsFocusLeftKey returns true if the key is a focus left key.

func IsFocusRightKey

func IsFocusRightKey(e *tcell.EventKey) bool

IsFocusRightKey returns true if the key is a focus right key.

func IsHelpKey

func IsHelpKey(e *tcell.EventKey) bool

IsHelpKey returns true if the key is a help key.

func IsQuitKey

func IsQuitKey(e *tcell.EventKey) bool

IsQuitKey returns true if the key is a quit key.

func IsScrollDownKey

func IsScrollDownKey(e *tcell.EventKey) bool

IsScrollDownKey returns true if the key is a scroll down key.

func IsScrollUpKey

func IsScrollUpKey(e *tcell.EventKey) bool

IsScrollUpKey returns true if the key is a scroll up key.

func ScrollDown

func ScrollDown(app *tview.Application) *tcell.EventKey

ScrollDown scrolls down the focused pane.

func ScrollUp

func ScrollUp(app *tview.Application) *tcell.EventKey

ScrollUp scrolls up the focused pane.

Types

type Picker

type Picker struct {
	Filepicker   filepicker.Model
	SelectedFile string
	Quitting     bool
	Err          error
}

Picker is a model for the file picker.

func NewPicker

func NewPicker() Picker

NewPicker returns a new file picker.

func (*Picker) Init

func (p *Picker) Init() tea.Cmd

Init initializes the file picker.

func (*Picker) Update

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

Update updates the file picker.

func (*Picker) View

func (p *Picker) View() string

View returns the file picker view.

Jump to

Keyboard shortcuts

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