Documentation
¶
Overview ¶
internal/modehandler/modehandler.go
Index ¶
- type Config
- type InputMode
- type ModeHandler
- func (mh *ModeHandler) GetCommandBuffer() string
- func (mh *ModeHandler) GetCurrentMode() InputMode
- func (mh *ModeHandler) GetCurrentModeString() string
- func (mh *ModeHandler) GetFindBuffer() string
- func (mh *ModeHandler) HandleKeyEvent(ev *tcell.EventKey) bool
- func (mh *ModeHandler) RegisterCommand(name string, cmdFunc plugin.CommandFunc) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Editor *core.Editor
InputProcessor *input.InputProcessor
EventManager *event.Manager
StatusBar *statusbar.StatusBar
QuitSignal chan<- struct{}
}
Config holds dependencies for the ModeHandler.
type ModeHandler ¶
type ModeHandler struct {
// contains filtered or unexported fields
}
ModeHandler manages input modes, command execution, and related state.
func (*ModeHandler) GetCommandBuffer ¶
func (mh *ModeHandler) GetCommandBuffer() string
GetCommandBuffer returns the current command buffer content (e.g., for display).
func (*ModeHandler) GetCurrentMode ¶
func (mh *ModeHandler) GetCurrentMode() InputMode
GetCurrentMode returns the current input mode.
func (*ModeHandler) GetCurrentModeString ¶
func (mh *ModeHandler) GetCurrentModeString() string
GetCurrentModeString returns the current input mode as a user-friendly string.
func (*ModeHandler) GetFindBuffer ¶
func (mh *ModeHandler) GetFindBuffer() string
GetFindBuffer returns the find buffer content.
func (*ModeHandler) HandleKeyEvent ¶
func (mh *ModeHandler) HandleKeyEvent(ev *tcell.EventKey) bool
HandleKeyEvent decides what to do based on current mode and key event. Returns true if the event resulted in an action requiring redraw.
func (*ModeHandler) RegisterCommand ¶
func (mh *ModeHandler) RegisterCommand(name string, cmdFunc plugin.CommandFunc) error
RegisterCommand adds a command to the registry. Called via EditorAPI.
Click to show internal directories.
Click to hide internal directories.