letter a to get from read only mode to edit mode implemented and working perfectly well
This commit is contained in:
@@ -47,6 +47,14 @@ 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)
|
||||
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;
|
||||
self.ideal_cursor_column = form_state.current_cursor_pos;
|
||||
}
|
||||
}
|
||||
self.is_edit_mode = true;
|
||||
self.edit_mode_cooldown = true;
|
||||
self.command_message = "Edit mode".to_string();
|
||||
|
||||
Reference in New Issue
Block a user