cursor

package
v0.0.0-...-99b4a15 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// Style for styling the cursor block.
	Style lipgloss.Style
	// TextStyle is the style used for the cursor when it is hidden (when blinking).
	// I.e. displaying normal text.
	TextStyle lipgloss.Style

	// char is the character under the cursor
	Char string
	// Position of the cursor
	Row, Col int
}

Model is the Bubble Tea model for this cursor element.

func New

func New() Model

New creates a new model with default settings.

func (*Model) Down

func (m *Model) Down()

func (*Model) Left

func (m *Model) Left()

func (*Model) Right

func (m *Model) Right()

func (*Model) Up

func (m *Model) Up()

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

Update updates the cursor.

func (Model) View

func (m Model) View() string

View displays the cursor.

Jump to

Keyboard shortcuts

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