co-authored by
Nathan Sobo
parent
c39c7c3eff
commit
46f8665e41
@@ -5,8 +5,9 @@ use super::{
|
||||
use crate::{settings::Settings, watch, workspace};
|
||||
use anyhow::Result;
|
||||
use gpui::{
|
||||
fonts::Properties as FontProperties, keymap::Binding, text_layout, App, AppContext, Element,
|
||||
ElementBox, Entity, FontCache, ModelHandle, View, ViewContext, WeakViewHandle,
|
||||
executor::BackgroundTask, fonts::Properties as FontProperties, keymap::Binding, text_layout,
|
||||
App, AppContext, Element, ElementBox, Entity, FontCache, ModelHandle, MutableAppContext, View,
|
||||
ViewContext, WeakViewHandle,
|
||||
};
|
||||
use gpui::{geometry::vector::Vector2F, TextLayoutCache};
|
||||
use parking_lot::Mutex;
|
||||
@@ -1178,6 +1179,10 @@ impl workspace::ItemView for BufferView {
|
||||
*clone.scroll_position.lock() = *self.scroll_position.lock();
|
||||
Some(clone)
|
||||
}
|
||||
|
||||
fn save(&self, ctx: &mut MutableAppContext) -> Option<BackgroundTask<Result<()>>> {
|
||||
self.buffer.update(ctx, |buffer, ctx| buffer.save(ctx))
|
||||
}
|
||||
}
|
||||
|
||||
impl Selection {
|
||||
|
||||
Reference in New Issue
Block a user