Add file_finder module

Still need to wire up key bindings to make it toggle.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Nathan Sobo
2021-03-21 10:50:07 -06:00
co-authored by Antonio Scandurra
parent 0c59937a65
commit f5df3681f8
10 changed files with 508 additions and 25 deletions
+8 -3
View File
@@ -3,8 +3,9 @@ use crate::{
executor::{self, ForegroundTask},
keymap::{self, Keystroke},
platform::{self, App as _, WindowOptions},
presenter::Presenter,
util::post_inc,
AssetCache, AssetSource, FontCache, Presenter,
AssetCache, AssetSource, FontCache,
};
use anyhow::{anyhow, Result};
use keymap::MatchResult;
@@ -1440,8 +1441,8 @@ impl<'a, T: Entity> ModelContext<'a, T> {
self.app
}
pub fn background_executor(&self) -> Arc<executor::Background> {
self.app.background.clone()
pub fn background_executor(&self) -> &Arc<executor::Background> {
&self.app.background
}
pub fn halt_stream(&mut self) {
@@ -1633,6 +1634,10 @@ impl<'a, T: View> ViewContext<'a, T> {
self.app
}
pub fn background_executor(&self) -> &Arc<executor::Background> {
&self.app.background
}
pub fn focus<S>(&mut self, handle: S)
where
S: Into<AnyViewHandle>,