preview tabs: Toggle preview tab when saving (#18158)
Release Notes: - Saving a preview tab will now mark it as a permanent tab
This commit is contained in:
parent
601090511b
commit
5d12e3ce3a
1 changed files with 7 additions and 2 deletions
|
@ -1595,7 +1595,12 @@ impl Pane {
|
|||
}
|
||||
|
||||
if can_save {
|
||||
pane.update(cx, |_, cx| item.save(should_format, project, cx))?
|
||||
pane.update(cx, |pane, cx| {
|
||||
if pane.is_active_preview_item(item.item_id()) {
|
||||
pane.set_preview_item_id(None, cx);
|
||||
}
|
||||
item.save(should_format, project, cx)
|
||||
})?
|
||||
.await?;
|
||||
} else if can_save_as {
|
||||
let abs_path = pane.update(cx, |pane, cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue