Documentation
¶
Index ¶
- func GetBufferCol(line string, visualCol int, tabWidth int) int
- func GetVisualCol(line string, col int, tabWidth int) int
- func GetVisualLineLength(line string, tabWidth int) int
- type Editor
- type Manager
- func (m *Manager) GetBufferCol(line string, visualCol int) int
- func (m *Manager) GetPosition() types.Position
- func (m *Manager) GetViewport() (int, int)
- func (m *Manager) GetVisualCol(line string, col int) int
- func (m *Manager) Move(deltaLine, deltaCol int)
- func (m *Manager) MoveCursor(deltaLine, deltaCol int)
- func (m *Manager) MoveToEndOfLine()
- func (m *Manager) MoveToLineEnd()
- func (m *Manager) MoveToLineStart()
- func (m *Manager) MoveToStartOfLine()
- func (m *Manager) PageMove(deltaPages int)
- func (m *Manager) ScrollToCursor()
- func (m *Manager) SetPosition(pos types.Position)
- func (m *Manager) SetViewSize(width, height int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBufferCol ¶
GetBufferCol translates a visual column to a buffer column
func GetVisualCol ¶
GetVisualCol translates a buffer column to a visual column
func GetVisualLineLength ¶
GetVisualLineLength computes the visual length of a line
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles cursor positioning and viewport management
func (*Manager) GetBufferCol ¶
GetBufferCol translates a visual column position to a buffer column position, accounting for tab characters.
func (*Manager) GetPosition ¶
GetPosition returns the current cursor position
func (*Manager) GetViewport ¶
GetViewport returns the current viewport top line and left column
func (*Manager) GetVisualCol ¶
GetVisualCol translates a buffer column position to a visual column position, accounting for tab characters.
func (*Manager) Move ¶
Move moves the cursor by the given delta This is an alias for MoveCursor to maintain API compatibility
func (*Manager) MoveCursor ¶
MoveCursor moves the cursor by the given delta
func (*Manager) MoveToEndOfLine ¶
func (m *Manager) MoveToEndOfLine()
MoveToEndOfLine moves the cursor to the end of the current line
func (*Manager) MoveToLineEnd ¶
func (m *Manager) MoveToLineEnd()
MoveToLineEnd moves the cursor to the end of the current line This is an alias for MoveToEndOfLine to maintain API compatibility
func (*Manager) MoveToLineStart ¶
func (m *Manager) MoveToLineStart()
MoveToLineStart moves the cursor to the start of the current line This is an alias for MoveToStartOfLine to maintain API compatibility
func (*Manager) MoveToStartOfLine ¶
func (m *Manager) MoveToStartOfLine()
MoveToStartOfLine moves the cursor to the first non-whitespace character
func (*Manager) ScrollToCursor ¶
func (m *Manager) ScrollToCursor()
ScrollToCursor ensures the cursor is visible in the viewport
func (*Manager) SetPosition ¶
SetPosition sets the cursor position
func (*Manager) SetViewSize ¶
SetViewSize updates the view dimensions