From b887f8df8cd55873d1fe27dc638836c9cfba03fb Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Thu, 5 Sep 2024 20:51:16 +0200 Subject: [PATCH] pane: Fix scrolling to items when there are pinned tabs (#17444) Closes #ISSUE Release Notes: - N/A --- crates/workspace/src/pane.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 578fdabad1da2866926c89e7612a7e82530cd870..2927d1c2ce9edba6dfcc60b12476c86e7cf8be7f 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -1013,7 +1013,11 @@ impl Pane { self.focus_active_item(cx); } - self.tab_bar_scroll_handle.scroll_to_item(index); + if !self.is_tab_pinned(index) { + self.tab_bar_scroll_handle + .scroll_to_item(index - self.pinned_tab_count); + } + cx.notify(); } }