Dispatch keystrokes and fix rerendering when window invalidated

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Nathan Sobo
2021-03-21 11:38:23 -06:00
co-authored by Antonio Scandurra
parent f5df3681f8
commit 046fe3fff9
9 changed files with 55 additions and 27 deletions
-3
View File
@@ -346,13 +346,10 @@ impl FileFinder {
fn select(&mut self, entry: &(usize, usize), ctx: &mut ViewContext<Self>) {
let (tree_id, entry_id) = *entry;
log::info!("selected item! {} {}", tree_id, entry_id);
ctx.emit(Event::Selected(tree_id, entry_id));
}
fn spawn_search(&mut self, query: String, ctx: &mut ViewContext<Self>) {
log::info!("spawn search!");
let worktrees = self.worktrees(ctx.app());
let search_id = util::post_inc(&mut self.search_count);
let task = ctx.background_executor().spawn(async move {
+1
View File
@@ -141,6 +141,7 @@ impl WorkspaceView {
ctx.focus(&modal);
self.modal = Some(modal.into());
}
log::info!("toggle modal notify");
ctx.notify();
}