Documentation
¶
Index ¶
- func ParseSubstituteCommand(cmdStr string) (pattern, replacement string, global bool, err error)
- type EditorInterface
- type Manager
- func (m *Manager) ClearHighlights()
- func (m *Manager) FindNext(forward bool) (types.Position, bool, bool)
- func (m *Manager) GetHighlights() []types.HighlightRegion
- func (m *Manager) HasHighlights() bool
- func (m *Manager) HighlightMatches(term string) error
- func (m *Manager) Replace(patternStr, replacement string, global bool) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EditorInterface ¶
type EditorInterface interface {
GetBuffer() buffer.Buffer
GetCursor() types.Position
SetCursor(types.Position)
GetEventManager() *event.Manager
ScrollToCursor()
GetHistoryManager() *history.Manager
}
EditorInterface defines methods the find manager needs from the editor.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles find, replace, and search highlighting logic.
func NewManager ¶
func NewManager(editor EditorInterface) *Manager
NewManager creates a find manager.
func (*Manager) ClearHighlights ¶
func (m *Manager) ClearHighlights()
ClearHighlights removes search highlight regions.
func (*Manager) FindNext ¶
FindNext finds the next occurrence and moves cursor to it. Now returns wrapped status as the third return value.
func (*Manager) GetHighlights ¶
func (m *Manager) GetHighlights() []types.HighlightRegion
GetHighlights returns the current search highlight regions.
func (*Manager) HasHighlights ¶
HasHighlights checks if there are any search highlights.
func (*Manager) HighlightMatches ¶
HighlightMatches finds and stores all occurrences for highlighting.
Click to show internal directories.
Click to hide internal directories.