clipboard

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: 9 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)
	GetSelection() (start types.Position, end types.Position, ok bool)
	ClearSelection()
	IsLinewise() bool
	GetEventManager() *event.Manager
	ScrollToCursor()
	MoveCursor(deltaLine, deltaCol int)
	GetHistoryManager() *history.Manager // Add GetHistoryManager method
}

EditorInterface defines methods needed from editor

type Manager

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

Manager handles clipboard operations

func NewManager

func NewManager(editor EditorInterface, useSystem bool) *Manager

NewManager creates a new clipboard manager, accepting the config flag

func (*Manager) CutSelection added in v0.1.3

func (m *Manager) CutSelection() (bool, error)

CutSelection copies and deletes selected text to clipboard

func (*Manager) Paste

func (m *Manager) Paste(after bool) (bool, error)

Paste inserts clipboard content at cursor. If after is true, it pastes after the cursor (like vim 'p'). If after is false, it pastes before the cursor (like vim 'P').

func (*Manager) YankSelection

func (m *Manager) YankSelection() (bool, error)

YankSelection copies selected text to clipboard

Jump to

Keyboard shortcuts

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