text

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EditorInterface

type EditorInterface interface {
	GetBuffer() buffer.Buffer // Changed return type to concrete buffer.Buffer
	GetCursor() types.Position
	SetCursor(pos types.Position)
	GetEventManager() *event.Manager
	ClearSelection()
	HasSelection() bool
	GetSelection() (start types.Position, end types.Position, ok bool)
	ScrollToCursor()
	GetHistoryManager() *history.Manager // Add GetHistoryManager method
}

EditorInterface defines editor methods needed

type Operations

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

Operations handles text insertion/deletion

func NewOperations

func NewOperations(editor EditorInterface) *Operations

NewOperations creates a text operations manager

func (*Operations) DeleteBackward

func (o *Operations) DeleteBackward() error

DeleteBackward deletes character before cursor

func (*Operations) DeleteForward

func (o *Operations) DeleteForward() error

DeleteForward deletes character after cursor

func (*Operations) InsertNewLine

func (o *Operations) InsertNewLine() error

InsertNewLine inserts a newline and applies auto-indentation.

func (*Operations) InsertRune

func (o *Operations) InsertRune(r rune) error

InsertRune inserts a single rune at cursor

func (*Operations) InsertTab

func (o *Operations) InsertTab() error

InsertTab inserts a tab character at the current cursor position

Jump to

Keyboard shortcuts

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