Support multi-cursor autocompletion
Co-Authored-By: Nathan Sobo <nathan@zed.dev> Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
60595a64bd
commit
3e8707ebf6
3 changed files with 93 additions and 41 deletions
|
@ -1314,6 +1314,12 @@ impl MultiBufferSnapshot {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn bytes_at<'a, T: ToOffset>(&'a self, position: T) -> impl 'a + Iterator<Item = u8> {
|
||||
self.bytes_in_range(position.to_offset(self)..self.len())
|
||||
.flatten()
|
||||
.copied()
|
||||
}
|
||||
|
||||
pub fn buffer_rows<'a>(&'a self, start_row: u32) -> MultiBufferRows<'a> {
|
||||
let mut result = MultiBufferRows {
|
||||
buffer_row_range: 0..0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue