Sticky multibuffer headers (#22391)
https://github.com/user-attachments/assets/92cc5ff7-d8be-4e4b-ac6e-68eb310fffce Release Notes: - Multibuffer headers will now stick to the top of the viewport as you scroll - Added support for expanding diagnostic excerpts --------- Co-authored-by: Michael <michael@zed.dev>
This commit is contained in:
parent
4c84600630
commit
45c714110e
5 changed files with 268 additions and 69 deletions
|
@ -32,6 +32,7 @@ use crate::{
|
|||
pub use block_map::{
|
||||
Block, BlockBufferRows, BlockChunks as DisplayChunks, BlockContext, BlockId, BlockMap,
|
||||
BlockPlacement, BlockPoint, BlockProperties, BlockStyle, CustomBlockId, RenderBlock,
|
||||
StickyHeaderExcerpt,
|
||||
};
|
||||
use block_map::{BlockRow, BlockSnapshot};
|
||||
use collections::{HashMap, HashSet};
|
||||
|
@ -1105,6 +1106,10 @@ impl DisplaySnapshot {
|
|||
.map(|(row, block)| (DisplayRow(row), block))
|
||||
}
|
||||
|
||||
pub fn sticky_header_excerpt(&self, row: DisplayRow) -> Option<StickyHeaderExcerpt<'_>> {
|
||||
self.block_snapshot.sticky_header_excerpt(row.0)
|
||||
}
|
||||
|
||||
pub fn block_for_id(&self, id: BlockId) -> Option<Block> {
|
||||
self.block_snapshot.block_for_id(id)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue