Skip to content

Commit d866c5f

Browse files
trepidityclaude
andcommitted
Handle Enter key on "+ New..." item in profiles tree
Pressing Enter on the "+ New..." item now opens the new profile form. Enter on a profile selects it (same as 'e' key). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e360d5d commit d866c5f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ impl ConnectionsTree {
109109
Action::None
110110
}
111111
}
112+
KeyCode::Enter => {
113+
if self.selected_key().map(|k| k.as_str()) == Some("action:new") {
114+
Action::ConnMgrNew
115+
} else if let Some(idx) = self.selected_profile_index() {
116+
Action::ConnMgrSelect(idx)
117+
} else {
118+
Action::None
119+
}
120+
}
112121
KeyCode::Char('n') => Action::ConnMgrNew,
113122
KeyCode::Char('e') => {
114123
if let Some(idx) = self.selected_profile_index() {

0 commit comments

Comments
 (0)