Documentation
¶
Index ¶
- type EditorInterface
- type Manager
- func (m *Manager) ClearSelection()
- func (m *Manager) GetSelection() (start types.Position, end types.Position, ok bool)
- func (m *Manager) HasSelection() bool
- func (m *Manager) IsLinewise() bool
- func (m *Manager) IsSelecting() bool
- func (m *Manager) SetLinewise(lw bool)
- func (m *Manager) StartOrUpdateSelection()
- func (m *Manager) UpdateSelectionEnd()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EditorInterface ¶
EditorInterface defines what the selection manager needs from editor.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles text selection state and logic.
func NewManager ¶
func NewManager(editor EditorInterface) *Manager
NewManager creates a new selection manager.
func (*Manager) ClearSelection ¶
func (m *Manager) ClearSelection()
ClearSelection resets the selection state.
func (*Manager) GetSelection ¶
GetSelection returns the normalized selection range (start <= end).
func (*Manager) HasSelection ¶
HasSelection returns whether there is an active selection.
func (*Manager) IsLinewise ¶ added in v0.1.3
IsLinewise returns whether the selection is line-wise (Vim 'V' mode).
func (*Manager) IsSelecting ¶
IsSelecting returns the raw selecting flag state.
func (*Manager) SetLinewise ¶ added in v0.1.3
SetLinewise sets whether the selection is line-wise.
func (*Manager) StartOrUpdateSelection ¶
func (m *Manager) StartOrUpdateSelection()
StartOrUpdateSelection is called when selection should start or extend (e.g., Shift+Move).
func (*Manager) UpdateSelectionEnd ¶
func (m *Manager) UpdateSelectionEnd()
UpdateSelectionEnd updates just the end position of the selection to match the current cursor position.