working a and i commands perfectly well

This commit is contained in:
filipriec
2025-02-25 16:07:01 +01:00
parent 71b373d661
commit 8a23af7f3f
3 changed files with 20 additions and 5 deletions

View File

@@ -47,8 +47,9 @@ impl EventHandler {
) -> Result<(bool, String), Box<dyn std::error::Error>> {
if let Event::Key(key) = event {
if !self.is_edit_mode && config.is_enter_edit_mode(key.code, key.modifiers) {
if key.code == KeyCode::Char('a') {
// Move cursor position one character to the right (after current character)
// Determine which type of edit mode we're entering
if config.is_enter_edit_mode_after(key.code, key.modifiers) {
// For 'a' (append) mode: Move cursor position one character to the right
let current_input = form_state.get_current_input();
if !current_input.is_empty() && form_state.current_cursor_pos < current_input.len() {
form_state.current_cursor_pos += 1;