vim: Fix key navigation on folded buffer headers (#25944)
Closes #24243 Release Notes: - vim: Fix j/k on folded multibuffer headers --------- Co-authored-by: João Marcos <marcospb19@hotmail.com>
This commit is contained in:
parent
3bec4eb117
commit
0bd40da546
8 changed files with 348 additions and 17 deletions
|
@ -1618,6 +1618,15 @@ impl BlockSnapshot {
|
|||
cursor.item().map_or(false, |t| t.block.is_some())
|
||||
}
|
||||
|
||||
pub(super) fn is_folded_buffer_header(&self, row: BlockRow) -> bool {
|
||||
let mut cursor = self.transforms.cursor::<(BlockRow, WrapRow)>(&());
|
||||
cursor.seek(&row, Bias::Right, &());
|
||||
let Some(transform) = cursor.item() else {
|
||||
return false;
|
||||
};
|
||||
matches!(transform.block, Some(Block::FoldedBuffer { .. }))
|
||||
}
|
||||
|
||||
pub(super) fn is_line_replaced(&self, row: MultiBufferRow) -> bool {
|
||||
let wrap_point = self
|
||||
.wrap_snapshot
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue