Dispatch keystrokes and fix rerendering when window invalidated
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
co-authored by
Antonio Scandurra
parent
f5df3681f8
commit
046fe3fff9
@@ -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 {
|
||||
|
||||
@@ -141,6 +141,7 @@ impl WorkspaceView {
|
||||
ctx.focus(&modal);
|
||||
self.modal = Some(modal.into());
|
||||
}
|
||||
log::info!("toggle modal notify");
|
||||
ctx.notify();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user