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:
parent
eba119b914
commit
c39b4ac229
3 changed files with 6 additions and 3 deletions
|
@ -5772,7 +5772,6 @@ impl Editor {
|
|||
|
||||
pub fn fold_at(&mut self, fold_at: &FoldAt, cx: &mut ViewContext<Self>) {
|
||||
let buffer_row = fold_at.buffer_row;
|
||||
|
||||
let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx));
|
||||
|
||||
if let Some(fold_range) = display_map.foldable_range(buffer_row) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue