ZIm/crates/workspace/src
vipex 8f9817173d
pane: Update pinned tab count when it exceeds actual tab count (#33405)
## Summary

This PR improves the workaround introduced in #33335 that handles cases
where the pinned tab count exceeds the actual tab count during workspace
deserialization.

## Problem

The original workaround in #33335 successfully prevented the panic but
had two issues:
1. **Console spam**: The warning message was logged repeatedly because
`self.pinned_tab_count` wasn't updated to match the actual tab count
2. **Auto-pinning behavior**: New tabs up until you exceed the old safe
tab count were automatically pinned after the workaround was triggered.

## Solution

Updates the defensive code to set `self.pinned_tab_count = tab_count`
when the mismatch is detected, ensuring:
- The warning is only logged once when encountered.
- New tabs behave normally (aren't auto-pinned)
- The workspace remains in a consistent state

This is an immediate fix for the workaround. I'll attempt to open up a
follow-up PR when i get the chance that will address the root cause by
implementing serialization for empty untitled tabs, as discussed in
#33342.

Release Notes:

- N/A
2025-06-25 19:52:15 +00:00
..
persistence Use read-only access methods for read-only entity operations (#31479) 2025-05-26 23:04:31 -04:00
dock.rs gpui: Simplify Action macros + support doc comments in actions! (#33263) 2025-06-24 04:34:51 +00:00
history_manager.rs History manager (#26369) 2025-04-11 21:34:51 +00:00
item.rs Don't autosave unmodified buffers (#32626) 2025-06-12 22:12:14 +00:00
modal_layer.rs editor: Hide mouse context menu when modal is opened (#29127) 2025-04-21 20:13:26 +05:30
notifications.rs Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
pane.rs pane: Update pinned tab count when it exceeds actual tab count (#33405) 2025-06-25 19:52:15 +00:00
pane_group.rs Improve cursor style behavior for some draggable elements (#31965) 2025-06-06 16:56:27 -04:00
persistence.rs zlog: Replace usages of env_logger in tests with zlog (#31436) 2025-05-26 11:48:50 -04:00
searchable.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
shared_screen.rs Add searchable global tab switcher (#28047) 2025-04-28 09:21:27 +00:00
status_bar.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
tasks.rs Unify the tasks modal and the new session modal (#31646) 2025-05-29 21:33:52 -04:00
theme_preview.rs Rename debug: commands to dev: (#30675) 2025-05-14 11:15:27 +02:00
toast_layer.rs Move workspace::toast_layer::RunAction to zed_actions::toast::RunAction (#32222) 2025-06-06 06:23:09 +00:00
toolbar.rs Fix toolbar spacing regressions (#29964) 2025-05-05 22:28:35 -03:00
workspace.rs Add language server control tool into the status bar (#32490) 2025-06-25 19:57:28 +03:00
workspace_settings.rs workspace: Add setting to make dock resize apply to all panels (#30551) 2025-06-04 17:40:35 +00:00