Skip to content

Commit 1f030fc

Browse files
trepidityclaude
andcommitted
Fix new profile action when connection form is focused
The early return in handle_view_key() bailed on all keys when no profile was selected, silently swallowing the 'n' key. Move the ConnMgrNew handler before the profile-dependent guard so it works regardless of focus or selection state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a7b21e6 commit 1f030fc

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

crates/loom-tui/src/components/connection_form.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,9 @@ impl ConnectionForm {
282282
}
283283

284284
fn handle_view_key(&mut self, key: KeyEvent) -> Action {
285-
if self.profile_index.is_none() {
286-
return Action::None;
287-
}
288285
match key.code {
289-
KeyCode::Char('e') => {
286+
KeyCode::Char('n') => Action::ConnMgrNew,
287+
KeyCode::Char('e') if self.profile_index.is_some() => {
290288
self.edit_profile();
291289
Action::None
292290
}

0 commit comments

Comments
 (0)