gpui: Fix uniform list scroll to offset for Top and Bottom strategies (#39938)
Closes #39863 Regressed in https://github.com/zed-industries/zed/pull/36653 Release Notes: - Fixed an issue where clicking a sticky item in the project panel wouldn’t correctly scroll the view to show its start.
This commit is contained in:
@@ -4624,7 +4624,7 @@ impl ProjectPanel {
|
||||
project_panel.marked_entries.clear();
|
||||
if is_sticky
|
||||
&& let Some((_, _, index)) = project_panel.index_for_entry(entry_id, worktree_id) {
|
||||
project_panel.scroll_handle.scroll_to_item_with_offset(index, ScrollStrategy::Top, sticky_index.unwrap_or(0));
|
||||
project_panel.scroll_handle.scroll_to_item_strict_with_offset(index, ScrollStrategy::Top, sticky_index.unwrap_or(0));
|
||||
cx.notify();
|
||||
// move down by 1px so that clicked item
|
||||
// don't count as sticky anymore
|
||||
|
||||
Reference in New Issue
Block a user