Fix boundary condition in buffer_line_len when at the end of a file

co-authored-by: max <max@zed.dev>
This commit is contained in:
Mikayla Maki 2023-03-17 16:56:44 -07:00
parent eba119b914
commit c39b4ac229
3 changed files with 6 additions and 3 deletions

View file

@ -641,7 +641,7 @@ impl DisplaySnapshot {
return false;
}
for next_row in (buffer_row + 1)..max_row {
for next_row in (buffer_row + 1)..=max_row {
let (next_indent_size, next_line_is_blank) = self.line_indent_for_buffer_row(next_row);
if next_indent_size > indent_size {
return true;