working suggestions but position is wrong
This commit is contained in:
@@ -85,20 +85,17 @@ pub async fn handle_edit_event(
|
||||
match action {
|
||||
"suggestion_up" | "suggestion_down" => { // Mapped to Tab/Shift+Tab
|
||||
if !register_state.in_suggestion_mode {
|
||||
// Enter suggestion mode
|
||||
register_state.update_role_suggestions(); // Populate suggestions
|
||||
register_state.update_role_suggestions();
|
||||
if !register_state.role_suggestions.is_empty() {
|
||||
register_state.in_suggestion_mode = true;
|
||||
register_state.show_role_suggestions = true;
|
||||
register_state.selected_suggestion_index = Some(0); // Select first
|
||||
return Ok("Suggestions shown".to_string()); // Consume the event
|
||||
register_state.selected_suggestion_index = Some(0);
|
||||
return Ok("Suggestions shown".to_string());
|
||||
} else {
|
||||
return Ok("No suggestions available".to_string()); // Consume, do nothing else
|
||||
return Ok("No suggestions available".to_string());
|
||||
}
|
||||
}
|
||||
// If already in suggestion mode, fall through to execute the action via auth_e
|
||||
}
|
||||
_ => {} // Other actions fall through
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
// --- End Special Handling ---
|
||||
|
||||
Reference in New Issue
Block a user