Skip to content

Commit

Permalink
Sanitize at the persistence layer
Browse files Browse the repository at this point in the history
  • Loading branch information
osiewicz committed Dec 2, 2024
1 parent babcbcf commit 02903d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/workspace/src/pane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ impl Pane {
}

pub(crate) fn set_pinned_count(&mut self, count: usize) {
self.pinned_tab_count = count.min(self.items.len());
self.pinned_tab_count = count;
}

pub(crate) fn pinned_count(&self) -> usize {
Expand Down
2 changes: 1 addition & 1 deletion crates/workspace/src/persistence/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ impl SerializedPane {
})?;
}
pane.update(cx, |pane, _| {
pane.set_pinned_count(self.pinned_count);
pane.set_pinned_count(self.pinned_count.min(items.len()));
})?;

anyhow::Ok(items)
Expand Down

0 comments on commit 02903d2

Please sign in to comment.