Allow editor to be saved when in multi-buffer mode
Also, this commit enables the customization of the title in a multi-buffer. When specified, it will take precedence over a filename (or "untitled").
This commit is contained in:
parent
9ea535986f
commit
dd223f93ec
4 changed files with 35 additions and 17 deletions
|
@ -28,7 +28,7 @@ use std::{
|
|||
sync::Arc,
|
||||
};
|
||||
use util::TryFutureExt;
|
||||
use workspace::{ItemNavHistory, Workspace};
|
||||
use workspace::{ItemNavHistory, ItemViewHandle as _, Workspace};
|
||||
|
||||
action!(Deploy);
|
||||
action!(OpenExcerpts);
|
||||
|
@ -573,7 +573,7 @@ impl workspace::ItemView for ProjectDiagnosticsEditor {
|
|||
}
|
||||
|
||||
fn save(&mut self, cx: &mut ViewContext<Self>) -> Task<Result<()>> {
|
||||
self.excerpts.update(cx, |excerpts, cx| excerpts.save(cx))
|
||||
self.editor.save(cx)
|
||||
}
|
||||
|
||||
fn can_save_as(&self, _: &AppContext) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue