compiled successfulywith rich suggestions now

This commit is contained in:
Priec
2025-07-29 23:49:58 +02:00
parent 20b428264e
commit f84bb0dc9e
14 changed files with 39 additions and 71 deletions

View File

@@ -11,8 +11,8 @@ use crate::state::pages::{
auth::{LoginState, RegisterState},
form::FormState,
};
use canvas::CanvasState;
use canvas::{CanvasAction, ActionDispatcher, ActionResult};
use canvas::canvas::CanvasState;
use canvas::{canvas::CanvasAction, dispatcher::ActionDispatcher, canvas::ActionResult};
use anyhow::Result;
use common::proto::komp_ac::search::search_response::Hit;
use crossterm::event::{KeyCode, KeyEvent};
@@ -170,7 +170,7 @@ pub async fn handle_edit_event(
return Ok(EditEventOutcome::Message(String::new()));
}
"exit" => {
form_state.deactivate_suggestions();
form_state.deactivate_autocomplete();
return Ok(EditEventOutcome::Message(
"Autocomplete cancelled".to_string(),
));
@@ -202,14 +202,14 @@ pub async fn handle_edit_event(
);
// 4. Finalize state
form_state.deactivate_suggestions();
form_state.deactivate_autocomplete();
form_state.set_has_unsaved_changes(true);
return Ok(EditEventOutcome::Message(
"Selection made".to_string(),
));
}
}
form_state.deactivate_suggestions();
form_state.deactivate_autocomplete();
// Fall through to default 'enter' behavior
}
_ => {} // Let other keys fall through to the live search logic