workspace: Sanitize pinned tab count before usage (#21417)
Fixes all sorts of panics around usage of incorrect pinned tab count that has been fixed in app itself, yet persists in user db. Closes #ISSUE Release Notes: - N/A
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user