diff --git a/Cargo.toml b/Cargo.toml index e452fac..7d5489e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ rustix = { version = "1.1.4", features = ["stdio"] } serde = "1.0.228" termcfg = { version = "0.2.0", features = ["crossterm_0_29_0"] } tokio = { version = "1.50.0", features = ["full"] } -toml = "1.1.0+spec-1.1.0" +toml = "1.1.0" # jaq dependencies jaq-core = "2.2.1" diff --git a/src/completion.rs b/src/completion.rs index 4e61ca3..419f016 100644 --- a/src/completion.rs +++ b/src/completion.rs @@ -179,6 +179,10 @@ impl CompletionNavigator { event: &Event, completion_keybinds: &CompletionKeybinds, ) -> Option { + if self.state.listbox.is_empty() { + return None; + } + // Move up. if completion_keybinds.up.contains(event) { self.state.listbox.backward(); @@ -270,6 +274,8 @@ pub fn start_completion_task( guide_action_tx .send(GuideAction::Show(GuideMessage::NoSuggestionFound(prefix))) .await?; + shared_ctx.set_active_index(Index::QueryEditor).await; + completion.clear_session_state(); } } }