Introduce staff-only inline completion provider (#21739)

Release Notes:

- N/A

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Thorsten <thorsten@zed.dev>
This commit is contained in:
Antonio Scandurra
2024-12-09 14:26:36 +01:00
committed by GitHub
co-authored by Thorsten Ball Bennet Thorsten
parent 39e8944dcc
commit 77b8296fbb
39 changed files with 2890 additions and 356 deletions
+6
View File
@@ -1125,6 +1125,12 @@ impl DisplaySnapshot {
DisplayRow(self.block_snapshot.longest_row())
}
pub fn longest_row_in_range(&self, range: Range<DisplayRow>) -> DisplayRow {
let block_range = BlockRow(range.start.0)..BlockRow(range.end.0);
let longest_row = self.block_snapshot.longest_row_in_range(block_range);
DisplayRow(longest_row.0)
}
pub fn starts_indent(&self, buffer_row: MultiBufferRow) -> bool {
let max_row = self.buffer_snapshot.max_row();
if buffer_row >= max_row {