Vim like search (#279)

* add quick search within a list

* vim like search navigation

* close cmd line with esc

* format

* document changes in README
This commit is contained in:
Moshe Sherman
2020-10-05 14:50:12 +03:00
committed by GitHub
parent fc79889665
commit f2b4f01242
6 changed files with 121 additions and 12 deletions

View File

@@ -67,6 +67,13 @@ impl Layout {
}
}
pub fn enable_jump(&mut self) {
if !self.cmdline_focus {
self.cmdline.set_content("/");
self.cmdline_focus = true;
}
}
pub fn add_view<S: Into<String>, T: IntoBoxedViewExt>(&mut self, id: S, view: T, title: S) {
let s = id.into();
let screen = Screen {