lines

package
v0.0.0-...-305ff81 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HandleLineKey string
	HandleHunkKey string

	CanReset     bool
	ResetLineKey string
	ResetHunkKey string
}

type DocType

type DocType int
const (
	Unstaged DocType = iota
	Staged
)

type PatchMsg

type PatchMsg struct {
	Direction patch.Direction
	Doc       patch.Document
	Lines     []int
}

type RefreshMsg

type RefreshMsg struct{}

type ResetMsg

type ResetMsg struct {
	Doc   patch.Document
	Lines []int
}

type UI

type UI struct {
	// contains filtered or unexported fields
}

func New

func New(dt DocType, dg docGetter, keyCfg Config, windowSize int) *UI

func (*UI) Init

func (u *UI) Init() tea.Cmd

func (*UI) Update

func (u *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*UI) UpdateDoc

func (u *UI) UpdateDoc() tea.Msg

func (*UI) View

func (dv *UI) View() string

Jump to

Keyboard shortcuts

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