Skip to content

Commit

Permalink
don't special-case the first pane with enter vs select behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
wfraser committed Jun 24, 2020
1 parent 8ab4c0f commit 41b40f5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ fn add_panel(ui: &mut Cursive, crate_id: CrateId, parent: &Item, depth: usize) {
.show_scrollbars(true)
);
}

// If this is the first one, we were called from pressing Enter, so focus it.
if depth == 1 {
horiz_layout.set_focus_index(1).unwrap();
}
});
}

Expand All @@ -130,7 +125,7 @@ pub fn run(browser: Browser) {
// TODO: implement a better live search than this
crates_select.set_autojump(true);

crates_select.set_on_submit(|ui, crate_id| {
crates_select.set_on_select(|ui, crate_id| {
add_panel(ui, crate_id.clone(), &Item::Root, 1);
});

Expand Down

0 comments on commit 41b40f5

Please sign in to comment.