internal

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindingDirectionKey

func BindingDirectionKey(g *gocui.Gui, viewName string, controller *ViewBufferController) error

func Bytes2String

func Bytes2String(data []byte) string

func FormatData added in v0.0.3

func FormatData(input string) string

func MultiSetKeybinding

func MultiSetKeybinding(g *gocui.Gui, viewName string, keys []interface{}, handler func(*gocui.Gui, *gocui.View) error)

func Printf added in v0.0.3

func Printf(w io.Writer, format string, args ...interface{})

func Println added in v0.0.3

func Println(w io.Writer, format string, args ...interface{})

func Quit

func Quit(*gocui.Gui, *gocui.View) error

func RunWithTimeout

func RunWithTimeout(ctx context.Context, timeout time.Duration, fn func() error) (err error)

func String2Bytes

func String2Bytes(data string) []byte

func TerminalBytes

func TerminalBytes(data []byte) []byte

func TerminalString

func TerminalString(line string) string

Types

type Location added in v0.0.3

type Location struct {
	TotalY int
	CurY   int
	TotalX int
	CurX   int
}

func (*Location) CurrentIndex added in v0.0.3

func (l *Location) CurrentIndex() string

type ViewBufferController

type ViewBufferController struct {
	Lines  [][]byte
	Origin int
	Size   int
}

func (*ViewBufferController) Clear

func (*ViewBufferController) Draw

func (c *ViewBufferController) Draw(v *gocui.View) error

func (*ViewBufferController) Location added in v0.0.3

func (c *ViewBufferController) Location(v *gocui.View) *Location

func (*ViewBufferController) MoveCursor

func (c *ViewBufferController) MoveCursor(v *gocui.View, x, y int) error

func (*ViewBufferController) ReDraw

func (c *ViewBufferController) ReDraw(v *gocui.View, data []byte) error

func (*ViewBufferController) Write

func (*ViewBufferController) WriteString

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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