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
Click to show internal directories.
Click to hide internal directories.